QActions in QML

Kevin Krammer krammer at kde.org
Tue Oct 30 15:01:37 UTC 2012


On Tuesday, 2012-10-30, Sebastian Kügler wrote:
> On Monday, October 29, 2012 13:46:18 Marco Martin wrote:
> > On Monday 29 October 2012, Daker Fernandes Pinheiro wrote:
> > > > > Daker Fernandes Pinheiro
> > > > > http://codecereal.blogspot.com
> > > > 
> > > > isn't QAction already registered as "action" primitive type?
> > > 
> > > At least not on QtQuick 1.1
> > 
> > not sure if is really qaction or some wrapper class, but
> > http://qt-project.org/doc/qt-4.8/qml-action.html
> 
> I don't know either. Using QAction as QtObject in QML works. On the other
> hand, QAction doesn't have trigger() as Q_INVOKABLE, yet it is one for the
> runtime (one can just call trigger() on a QAction passed into the runtime.

Sorry for jumping into this thread, but trigger() is a slot (public even), so 
it should be invokable even without Q_INVOKABLE.

In any case, I am curious what the use case of triggering a UI action is?
I mean any imperative portion of the QML could just invoke the script function 
the action's onTriggered is calling, no?

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20121030/c320d11a/attachment.sig>


More information about the Plasma-devel mailing list