[Interest] QIcon vs QQuickIcon

ivan tkachenko me at ratijas.tk
Wed Jun 1 01:08:21 CEST 2022


> The standard solution is to use a QQuickImageProvider.
> In C++ you would implement your own QQuickImageProvider which will contain
> the QIcons.
> In QML then you would use a url like "image://myprovider/icon_id".
> Then the QML engine will call your QQuickImageProvider to retrieve the icon
> image.
> 
> An alternative solution might be to use data urls, but I have never tried
> it.

Sounds insanely complex when just got a QIcon from somewhere and you want to 
feed it into UI.

Well, thanks for clarifying that no [easy] solution is currently available in 
the Qt itself.

-- 
ivan (@ratijas)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20220601/21350fe4/attachment.sig>


More information about the Interest mailing list