Results 1 to 2 of 2

Thread: Key shortcuts for not visible widgets

  1. #1
    Join Date
    Mar 2007
    Posts
    14
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Key shortcuts for not visible widgets

    Hi,
    I have a widget stack and one of the widgets inside contains a menu with QActions that have keyboard shortcuts to activate them.
    When the widget is not visible in the stack, the shortcuts do not work, but I would like them to work.
    I have tried redirecting the QEvent::Accel events that get to the main view class to the stacked widget and/or to the menu, but none of the options work.

    Qt Code:
    1. bool main_view::event(QEvent* e)
    2. {
    3.  
    4. bool rv;
    5.  
    6. switch(e->type())
    7. {
    8. default:
    9. rv = QMainWindow::event(e);
    10. break;
    11. case QEvent::Accel:
    12. case QEvent::AccelOverride:
    13. {
    14. QApplication::sendEvent( stacked_widget, e );
    15. }
    16. }
    17. ...
    To copy to clipboard, switch view to plain text mode 

    Any ideas of how I could achieve it?

  2. #2
    Join Date
    Mar 2007
    Posts
    14
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Key shortcuts for not visible widgets

    Still no luck. Anyone can help please?

Similar Threads

  1. All widgets are visible in QStackedWidget
    By YuriyRusinov in forum Qt Programming
    Replies: 14
    Last Post: 22nd March 2007, 12:02
  2. Performance in hiding/showing widgets
    By Paalrammer in forum Newbie
    Replies: 12
    Last Post: 14th February 2007, 18:57
  3. Replies: 11
    Last Post: 7th July 2006, 13:09
  4. Creating Widgets
    By hylke in forum Qt Programming
    Replies: 2
    Last Post: 5th February 2006, 08:37

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
  •  
Qt is a trademark of The Qt Company.