Results 1 to 3 of 3

Thread: QMenu

  1. #1
    Join Date
    Nov 2007
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QMenu

    Hi!

    I have a menu with several submenus. In the default implementation, when the main menu is visible, the submenus popup as the corresponding caption is highlighted by the mouse pointer. Is it possible to avoid this behavior, and make the submenus popup only after a mouse click on the captions?

    I'm using Qt 4.3.

    Thanks for your replies.
    Luca

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

    Default Re: QMenu

    I think this behaviour is following your platform style, so there is probably not much you can do without heavy changes. You can probably check the sourcecode of QMenu and find a way to block automatic expanding of menus - this probably involves setting an event filter on all menus (or the application) and blocking some event.

  3. #3
    Join Date
    Nov 2007
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QMenu

    Thank you wysota for your fast reply.

Similar Threads

  1. Caption in QMenu
    By Lykurg in forum Newbie
    Replies: 4
    Last Post: 16th April 2014, 22:41
  2. no compile error, but error on run with QMenu QAction
    By sincnarf in forum Qt Programming
    Replies: 4
    Last Post: 4th May 2011, 11:05
  3. QMenu and signals
    By mattia in forum Newbie
    Replies: 6
    Last Post: 20th December 2007, 09:09
  4. how to popup and close a QMenu
    By Placido Currò in forum Qt Programming
    Replies: 15
    Last Post: 14th May 2007, 16:41
  5. Qmenu Stable close on QTableWidget
    By patrik08 in forum Qt Programming
    Replies: 1
    Last Post: 17th July 2006, 10:03

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.