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.
Re: Removing the selection of a menu item from QMenuBar
Quote:
Originally Posted by
febil
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.
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?