[Development] QAction-like API for QML

Stephen Kelly stephen.kelly at kdab.com
Wed Dec 19 12:57:28 CET 2012

On Tuesday, December 18, 2012 10:35:04 Alan Alpert wrote:
> > But I still think the action needs a name, which can be used by the
> > image provider to find the icon.  (This is independent of whether the
> > image provider uses files or resources; the icon will be found by name
> > either way.)  Maybe we can reuse objectName for that.  So the action
> > is just called "open" but the image provider can go looking for
> > icon-open-action.png or something, using its own naming convention.
> > The point of that is to avoid repeating yourself in QML.
> objectName has its uses, don't just give it an extra meaning. I see no
> problem with adding a separate actionName or name property if that's
> helpful, despite the presence of objectName.

I agree. In particular, using objectName for both the name of the action and 
automatically for part of the name of the icon seems like a bad idea to me.


Stephen Kelly <stephen.kelly at kdab.com> | Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20121219/9f16dca5/attachment.sig>

More information about the Development mailing list