[Qt-interest] Using QGraphicsWidget's QActions

Mihail Naydenov mlists at ymail.com
Fri Apr 23 16:04:54 CEST 2010


I see thank you, I did not know that.

However these (contextMenuPolicy-s) are not available for QGraphicsWidgets (yet?).
(The only policy is to call contextMenuEvent, so it seams one must create the menu manually)

MihailNaydnov


>
>From: Michael <user23 at web.de>
>To: qt-interest at trolltech.com
>Sent: Thu, April 22, 2010 7:04:45 PM
>Subject: Re: [Qt-interest] Using QGraphicsWidget's QActions
>
>>
>
>
>
>  
>
>Am 22.04.2010 15:48, schrieb Mihail Naydenov:
>
>Hi, I guess Its a newbie one, but I cant figure out how to use QGraphicsWidget's QActions in the most basic way...
>>
>>The docs say 
>>"The default use of the QAction list (as returned by actions()) is to create a context QMenu"
>>
>>What does it mean?
>>I kind of expected a Context Menu will popup with all actions() listed. Or implies its common to (manually) create such menu.
>>
>>Also it seams no events like Action added are received. Does QGraphicsWidget receives *any* events from its actions.
>>
>>
>>In general, how I am supposed to use a widget's actions and how are they different then regular "free standing" or child actions?
>>
>>Thanks
>>MihailNaydenov
>>
>>I use the QWidget::actions merly in context menu. Maybe
>Qt::ContextMenuPolicy is, what you are missing. This has to be set to
>Qt::ActionsContextMenu.
>>Hope that helps
>
>>Michael 


      



More information about the Qt-interest-old mailing list