Copy link to clipboard
Copied
Hello,
I am currently having an issue with my plugin on macOS using Qt. When selecting a text box (i.e. QLineEdit or QTextEdit) I can enter text but most times (sometimes it works?) I cannot use shortcuts to commands like cut, copy and insert text as it conflicts with the commands of Adobe Illustrator itself. This is my current code in my CustomPlugin::StartupPlugin() function:
customWidget = new CustomWidget();
[panelPlatformWindow setAutoresizesSubviews:YES];
NSView* customWidgetView = (__bridge NSView*)reinterpret_cast<void*>(customWidget->winId());
[customWidgetView setAutoresizingMask:NSViewWidthSizable | NSViewWidthSizable];
[customWidgetView setAutoresizesSubviews:YES];
[panelPlatformWindow setFrame:[customWidgetView frame]];
[panelPlatformWindow addSubview:customWidgetView positioned:NSWindowAbove relativeTo:nil];
customWidgetView->show();
Before initializing QApplication, Qt::AA_PluginApplication is set. I also tried it with QMacNativeWidget as it is described here but the behaviour is the same. I am using this approach because it scales the widget 1:1 to the panel. I also tried catching the QKeyEvent but it seems to not even arrive in Qt when it triggers the Adobe Illustrator shortcuts, e.g. inserting a text in the current document instead of inserting it in the currently focused QLIneEdit/QTextEdit.
I am using Qt 5.12.1, Adobe Illustrator SDK 2017, Xcode 7.3.1, macOS 10.13.
Any help is really welcome!
Kind regards,
Sebbo
Copy link to clipboard
Copied
Hello,
I am currently having an issue with my plugin on macOS using Qt. When selecting a text box (i.e. QLineEdit or QTextEdit) I can enter text but most times (sometimes it works?) I cannot use shortcuts to commands like cut, copy and insert text as it conflicts with the commands of Adobe Illustrator itself. This is my current code in my CustomPlugin::StartupPlugin() function:
customWidget = new CustomWidget();
[panelPlatformWindow setAutoresizesSubviews:YES];
NSView* customWidgetView = (__bridge NSView*)reinterpret_cast<void*>(customWidget->winId());
[customWidgetView setAutoresizingMask:NSViewWidthSizable | NSViewWidthSizable];
[customWidgetView setAutoresizesSubviews:YES];
[panelPlatformWindow setFrame:[customWidgetView frame]];
[panelPlatformWindow addSubview:customWidgetView positioned:NSWindowAbove relativeTo:nil];
customWidgetView->show();
Before initializing QApplication, Qt::AA_PluginApplication is set. I also tried it with QMacNativeWidget as it is described here but the behaviour is the same. I am using this approach because it scales the widget 1:1 to the panel. I also tried catching the QKeyEvent but it seems to not even arrive in Qt when it triggers the Adobe Illustrator shortcuts, e.g. inserting a text in the current document instead of inserting it in the currently focused QLIneEdit/QTextEdit.
I am using Qt 5.12.1, Adobe Illustrator SDK 2017, Xcode 7.3.1, macOS 10.13.
Any help is really welcome!
Kind regards,
Sebbo
Copy link to clipboard
Copied
Hi Sebbo!
Did you get any answer here? I run into the same problem.
Best,
Paul