Results 1 to 2 of 2

Thread: Rerouting messages for keyboard shortcut selection dialog.

  1. #1
    Join Date
    Feb 2009
    Posts
    33
    Thanks
    6
    Thanked 7 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Rerouting messages for keyboard shortcut selection dialog.

    Hello again,

    I would like to fix a keyboard-shortcut dialog that doesn't allow keys like Ctrl+Tab or Ctrl+Space to be selected by the user due to the dialog handling them and discarding the key combination before the message gets to the code that sets the shortcut. For example, if I open the dialog and goto the Indent/Unindent setting it won't allow me to set those two commands to Tab and Shift+Tab, but instead it just cycles through the dialog's buttons like the tab-key usually does in a dialog box. I'm sure others have encountered this and I'm wondering what's the easiest/best way to reroute the key-presses to the shortcut selection instead of the dialog.

    Regards,
    -andy.f

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Rerouting messages for keyboard shortcut selection dialog.

    Reimplement the QObject::event() method for appropriate widgets or apply an event filter that will prevent the default implementation of event() from handling the event.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    andy.fillebrown (17th June 2009)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.