[Interest] how to use QAction::changed() and doc missing

Alex Malyushytskyy alexmalvtk at gmail.com
Thu Jul 4 00:27:06 CEST 2013


Connect changed to your custom slot where you will check if action changed
the state,
You will need somehow to get pointer to QAction and previous state there.
There are multiple ways to do it.

For example: You may subclass QAction,  add  variable which would keep
previous enable state ,
add slot there. connect slot to the change signal before you set variable
state in constructor.
Add special signal enableStateChanged() trigger it in the  mentioned slot
if state changed.




On Wed, Jul 3, 2013 at 10:24 AM, Vincent <vincentb1981 at gmail.com> wrote:

> Hello,
>
> It seems that QAction::changed() is not documented (if I understand well
> what does it do)
>
> When clicking on the "changed()" links all across the following doc page,
> we are pointed to the "What is this" property description:
>
> http://qt-project.org/doc/qt-5.0/qtwidgets/qaction.html
>
>
> What I would like to do is to connect a slot to a signal that would be
> raised when the QAction is enabled/disabled. Do you know how to do that?
>
> Thanks,
>
> Cosmo
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130703/0729f12f/attachment.html>


More information about the Interest mailing list