[Development] QAction-like API for QML
André Somers
andre at familiesomers.nl
Thu Dec 20 12:26:25 CET 2012
Op 20-12-2012 12:11, Shawn Rutledge schreef:
> So ultimately at that company all the abstract actions you would have
> wanted to create would still have to be converted into gui-oriented
> actions anyway, right? How would you avoid writing code to bridge or
> augment them into actions which can be realized in the gui? Or did you
> have completely non-gui use cases? Anyway maybe at such companies, the
> non-gui action class would tend to have other properties which we
> cannot predict in advance.
If there were such a thing as a QCoreAction/QTrigger, it would be a
simple matter of creating the QAction based on that
QCoreAction/QTrigger, setting some visual properties and using this
action in toolbars, menus and whatnot. That's all. The code dealing with
things like synchronizing the availability and state of the action with
the backend would be taken care of using the QCoreAction, with no bridge
code to write at all.
I have no completely non-GUI use cases I can come up with at this
moment. However, it would be a useful piece of bridge code.
André
More information about the Development
mailing list