Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QMacNativeWidget and Keyboard Input Focus
Qt 6.11 is out! See what's new in the release blog

QMacNativeWidget and Keyboard Input Focus

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    uranusjr
    wrote on last edited by
    #1

    Hi,

    I recently met some bumps while trying to implement some tab behaviors on Mac OS X. I found a nice gadget written under Cocoa that suits my need pretty well, so I made a wrapper to put QWidgets into the framework. This worked fine, until I tried to put some text-input widgets in it... The Qt text-input widgets (QLineEdit, for example) can't get keyboard focus at all.

    I did some search on the Net and found that setting Qt::AA_MacPluginApplication can solve this, but this also make the application menu appears on windows (instead of being global like those in normal Mac apps), which is not acceptable.

    Is there any way to get around this problem? I don't use any Cocoa text-input controls, only Qt ones, so the keyboard focuses conflicting problem is not important — at least I think it isn't.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved