[Development] QAction-like API for QML

Bache-Wiig Jens Jens.Bache-Wiig at digia.com
Tue Dec 18 11:53:24 CET 2012


> 
> Right, but referring to a file (bundled or in the resources) is still 
> referring to the icon by name, no?

One of them is a logical icon-name the other one is a file-name. The logical name refers to an icon outside of the application, the file name refers to a file bundled inside the application.

> Taking your example of "edit-copy", does it make any difference if edit-
> copy.png is stored in some system wide shared locations, relative to the 
> application executable or in the application's resources?

You can bundle an icon theme and include only the icons you are using in your application. That way icon names would work even on windows and mac.

> In the end the result is QIcon( filename ) being used, right?

Yes eventually. But the application doesn't have to care know which one. Feel free to look up QIcon::fromThemeName. It should explain the relevant details.


Regards,
Jens




More information about the Development mailing list