Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, August 2007
Inserting QWidgets into QMenu


Message 1 in thread

In Qt3 one could display a QWidget inside a QPopupMenu (insertItem() method)

I wonder how this in done in Qt4 (?)

Regards
.....Volker

--
 [ signature omitted ] 

Message 2 in thread

Hello,

see QWidgetAction in your documentation :)

Example:

QWidgetAction* action = new QWidgetAction;
action->setDefaultWidget( new QLabel("Hello Menu") );

menu->addAction(action);

Greetings,
Christoph

--
 [ signature omitted ] 

Message 3 in thread

Am Donnerstag 09 August 2007 12:30:23 schrieb Christoph Keller:
> Hello,
>
> see QWidgetAction in your documentation :)
>
> Example:
>
> QWidgetAction* action = new QWidgetAction;
> action->setDefaultWidget( new QLabel("Hello Menu") );
>
> menu->addAction(action);
>
> Greetings,
> Christoph
What the....?! Of course! QWidgetAction - that's it! must have overlooked it 
all the time i searched the docs.

Thanks :-)

--
 [ signature omitted ]