View Full Version : Removing the selection of a menu item from QMenuBar
febil
16th March 2009, 12:04
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.
pckoster
17th March 2009, 09:35
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.
febil
18th March 2009, 09:31
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?
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.