What about passing the image in base64 format in the source property ? -----Message d'origine----- De : Interest <interest-boun...@qt-project.org> De la part de ivan tkachenko Envoyé : mercredi 1 juin 2022 01:08 À : Benjamin TERRIER <b.terr...@gmail.com> Cc : Qt Interest <interest@qt-project.org> Objet : Re: [Interest] QIcon vs QQuickIcon
> 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) _______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest