Results 1 to 2 of 2

Thread: QToolBar grabs SPACE and can't pass space to its parent to create access keys

  1. #1
    Join Date
    Apr 2009
    Posts
    132
    Thanks
    67
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Smile QToolBar grabs SPACE and can't pass space to its parent to create access keys

    Hi friends!

    I'm doing a level editor (similar to corel draw, with a QToolBar with different tools like hand, cursor, rectangle...). I'd like that pressing C key, cursor is selected, no problem if I rewrite keyPressedEvent, but I want to select my 'hand' tool when pressing SPACE, it seems QToolBar grabs this key.

    Any suggestion?

    BTW, I'm using QActionGroup in order to have one and only one tool selected.

    Thanks a lot for your help.

  2. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QToolBar grabs SPACE and can't pass space to its parent to create access keys

    you can put a eventFilter() to your mainWindow and pass the keyevent to any widget

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.