[Interest] Long menus on Windows
alexmalvtk at gmail.com
Mon Jun 3 23:46:12 CEST 2013
I will try to recall what I did once.
Instantiate and add subclass of QWidgetAction to the menu.
Such subclass had to instantiate your widget (better not to derive it from
To do this override createWidget. Such widget can be any complex or simple
If not mistaken I had explicitly call setAutoFillBackground(true ) in a
You would also have to close menu yourself as a reaction on appropriate
events (for example item selection)
for example in your widget when user selected item you might call
Q_ASSERT( parentWidget()->inherits( "QMenu" ) );
Hope this helps,
On Fri, May 31, 2013 at 3:24 PM, John Weeks <john at wavemetrics.com> wrote:
> Thank you! You seem to be the only one that takes an interest in my
> peculiar questions.
> The dialog takes extra clicks- one to select a menu item that displays the
> dialog, then more clicks to interact with the dialog and click OK button. I
> agree that huge menus aren't great; I'm not sure where the big menu gets to
> be big enough to counteract the drawbacks of putting up a dialog.
> By the way you can always to make your dialog function like menu.
> That would be cool. Can you give me a pointer to get me started?
> Wait- I guess there really isn't any trickiness- just a button; when you
> click the button, the dialog goes up posititioned at the mouse click. Any
> accept or reject causes the dialog to disappear. I'll think seriously about
> -John Weeks
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest