Using an Image Provider to Share Images from a C++-hosted Data Model to QML

In a previous post, I demonstrated how to use an image provider for a relatively simple use case: loading QML from the application’s resources. Another common question I’ve heard is how to do the same from an application model; say you’ve got an existing C++ model that carries images for each item; how do you … Continue reading Using an Image Provider to Share Images from a C++-hosted Data Model to QML

Using an Image Provider to Supply Images to QML Applications from Qt Resources

Your hybrid QML/C++ application can load its QML from a Qt resource, but what about images? If you load the QML from a Qt resource, then all of your images are loaded from the Qt resource segment as well. But what if you want to supply your QML as files (or deliver them over the … Continue reading Using an Image Provider to Supply Images to QML Applications from Qt Resources

Providing images to Qt Quick with QQuickImageProvider…

I have been meaning to post this for a while, although no one’s asked me specifically about it. A couple of years ago, while at Nokia, I wrote this post on QML and image providers for Qt 4.x. While revising my latest book on Qt this fall, I learned that in Qt 5.x, the QDeclarativeImageProvider … Continue reading Providing images to Qt Quick with QQuickImageProvider…