[Qt-interest] QAction.

Shabd Swarup V shabd at cadence.com
Wed Feb 18 14:10:11 CET 2009


Thanks Alex, but parentWidget() actually returns the MainWindow instead of the MenuBar/ToolBar.

Regards,
Shabd

-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Alexandre Beraud
Sent: Wednesday, February 18, 2009 6:25 PM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] QAction.

Hi,

You can try to make a qobject_cast on the parentWidget() and check 
whether it is null or not.

Regards,

Alex



Shabd Swarup V a écrit :
>
> Hi,
>
>  
>
> If I have access to a *QAction* object, is there a way to find out 
> whether that action is part of a MenuBar, ToolBar or a PopUpMenu etc.
>
> Please let me know.
>
>  
>
> Thanks in advance.
>
>  
>
> Regards,
>
> Shabd
>
>  
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>   


-- 
BERAUD Alexandre
Ingénieur Développement

Infflux - Informatique & Flux
Tel: 01 49 57 92 00 - Fax : 01 49 57 92 01
Mail: aberaud at infflux.com
Visitez notre site :  www.infflux.com


_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list