[Qt-interest] Using QGraphicsWidget's QActions

Michael user23 at web.de
Thu Apr 22 18:04:45 CEST 2010


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100422/3ef70f01/attachment.html 


More information about the Qt-interest-old mailing list