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. MacOS X Escape key handling - How?
Forum Updated to NodeBB v4.3 + New Features

MacOS X Escape key handling - How?

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.4k 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.
  • L Offline
    L Offline
    lood.at.qtdev
    wrote on last edited by
    #1

    Hi Guys!

    I'm currently working on a cross-platform app with Qt. It works fine on Win and Linux, but on Mac a problem poped up...

    I can't handle key events. I've read in the documentation, there are 2 function for mac event a handling QApplication::macEventfilter(...) and QWidget::macEvent(...). The usage of these is not clear to me, because I can't find examples on the web.

    The only thing I want to implement is to handle an Escape keystroke. But the Apple Dev site says that the escape key doesn't geneterate an ordinary key event, instead of that it generates some cancelOperation action message with NSResponder object.

    I'm not a Mac developer, so I not very familiar with these things.

    I would be very happy if anybody could help me or could just post a fine code snippet of handling escape key with Qt on Mac.

    Thx.
    Ben

    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