• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

macOS Qt QLineEdit/QTextBox Focus Issue

Community Beginner ,
Mar 05, 2019 Mar 05, 2019

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

TOPICS
SDK

Views

750

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
New Here ,
Oct 02, 2020 Oct 02, 2020

Copy link to clipboard

Copied

LATEST

Hi Sebbo!

Did you get any answer here? I run into the same problem.

Best,

  Paul

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines