PDA

View Full Version : displaying multiple Qt::Popup widgets? (widget above QMenu)



gobills
6th September 2013, 21:00
I am trying to display a custom toolbar widget above a QMenu similar to right clicking on an object in excel or powerpoint. Since both widgets are popup widgets and they behave as a stack in qt, when you click outside of the menu and custom widget, the top popup widget closes and then the next popup widget becomes the top. Are there any suggestions on how to make this behave as though both widgets are on top and if you click on a widget, the event occurs on the widget while closing the other? I've tried installing an event filter but didnt have much luck getting the correct behavior. Perhaps create a single widget that contains both?

gobills
7th September 2013, 02:13
found more information below. Not the greatest solution since it is using the mouse release to detect if something on the toolbar is pressed. Any better ideas would be appreciated!

http://blog.qt.digia.com/blog/2012/12/07/qt-support-28-creating-a-toolbar-widget-that-is-displayed-with-the-context-menu/