Results 1 to 3 of 3

Thread: Removing the selection of a menu item from QMenuBar

  1. #1
    Join Date
    Feb 2009
    Posts
    29
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Removing the selection of a menu item from QMenuBar

    Is it possible to remove the selection and focus of a menu item in QMenuBar? I need to remove the selection after clicking on a menu item. That is after clicking on a menu item, it should not be possible to navigate to the next menu item during mouse move.
    Thanks in advance for the assistance.

  2. #2
    Join Date
    Mar 2009
    Location
    Leiden, The Netherlands
    Posts
    10
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Removing the selection of a menu item from QMenuBar

    Quote Originally Posted by febil View Post
    Is it possible to remove the selection and focus of a menu item in QMenuBar? I need to remove the selection after clicking on a menu item. That is after clicking on a menu item, it should not be possible to navigate to the next menu item during mouse move.
    Thanks in advance for the assistance.
    Every menu item is considered a QAction type which emits a signal triggered(). In a slot connected to this signal, you can enable/disable the 2nd menu you mention, thus creating the required functionality.

  3. #3
    Join Date
    Feb 2009
    Posts
    29
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Removing the selection of a menu item from QMenuBar

    Thanks for the reply.
    Actually my aim is not to use sub menu. That is i need to do some operations just clicking the menu. For that i made the sub menu invisible and used the signal "abouttoshow()". But the focus and selection is still in menu. So my aim is not working correctly.
    Is there any possibility?

Similar Threads

  1. mapping menu item with QPushButton
    By navi1084 in forum Qt Programming
    Replies: 2
    Last Post: 15th October 2010, 21:56
  2. Replies: 1
    Last Post: 18th March 2009, 04:56
  3. creating a "path" for the menu item
    By roxton in forum Qt Programming
    Replies: 4
    Last Post: 17th January 2009, 16:32
  4. Menu Item has no highlight
    By blackfox in forum Qt Programming
    Replies: 6
    Last Post: 24th September 2008, 12:17
  5. Qt/MacOSX preferences menu item
    By mcenatie in forum Qt Programming
    Replies: 4
    Last Post: 14th March 2006, 04:24

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.