How i can make checkbox a part of menu item sothat menu will be like we have when we right click over designers toolbar.
quickNitin
How i can make checkbox a part of menu item sothat menu will be like we have when we right click over designers toolbar.
quickNitin
You have to make the appropriate action checkable. See QAction::setCheckable().
J-P Nurmi
thanks jacek,
i have some more doubt.
What i want to do is to make submenu checkable.
This submenu contains menu item responsible for displaying various shapes.
When this submenu is not checked all item displayed by submenu's menu item are not shown.
Also subMenu should not expand. how i can avoid submenu from expanding.
Heh, jacek indeed deserves to be thanked for doing such a great job on the forums..
Anyway.. a single action can be checkable, a submenu can't. And it wouldn't make any sense either. Consider an interface which requires user to click on the submenu item to expand it (this is the case for example with the motif style). What should be done upon click over the submenu? Change check state or show the menu? You can disable the submenu if you want to prevent it from to be shown.
J-P Nurmi
quickNitin (16th November 2006)
Bookmarks