[Development] QAction-like API for QML

Rutledge Shawn Shawn.Rutledge at digia.com
Wed Dec 19 11:52:00 CET 2012


On 19 Dec 2012, at 9:13 AM, André Somers wrote:

> Op 14-12-2012 8:45, Bache-Wiig Jens schreef:
>> What I would propose is that we keep the QAction exactly as it is and make it possible to use it from QML as well as introduce a new slightly simplified QML Action component as previously suggested. The only drawback to this approach is that actions you declare in QML won't be immediately usable from C++, but I don't see this as a big issue. You will either keep everything in QML or have your business logic including your QActions defined in in C++.
> As mentioned by others, this would mean that any C++ core that you write 
> would *have* to pull in QtWidgets in order to be able to use actions. 
> Even if you only have a QML gui. Not very attractive, if you ask me.

No, that idea is meant to be in parallel: if you have legacy code which already creates QActions maybe it's possible expose them to QML; but for new QtQuick code we will have a new action which doesn't depend on widgets.




More information about the Development mailing list