[Interest] Can't get menu with QWidgetAction to close after click! (Mac OS 10.6.8, Qt 4.8.3)

Jim Prouty jim at wavemetrics.com
Wed Oct 10 00:39:07 CEST 2012


On Oct 9, 2012, at 12:31 PM, Stephen Chu wrote:

> Are you sure you want a push button or a text entry field in the menu
> from the menu bar?
> 
> It's, hmm, very different way of building an UI. Especially on a Mac.
> 

That's only a test program; the real application has a color swatch in the widget that gets clicked.

But the issue is the same (and this sample code is simpler): after interacting with the QWidgetAction inserted into a menu, how can I get the menu to go away?

Clicking in a normal action (menu item) dismisses the menu after emitting triggered().

I'd like the same behavior for my QWidgetAction, but it just sits there like a bump on a log whether it contains a button or a color swatch.

--Jim

========================================================================

Jim "How does it work?" Prouty

Voice: (503) 620-3001, FAX: (503) 620-6754
Makers of IGOR Pro, scientific data analysis and graphing for Mac and PC
http://www.wavemetrics.com




More information about the Interest mailing list