Native icons in QML on MeeGo Harmattan
Hi does anyone know if it’s possible to access the icons for the current theme and use them in QML?
3 replies
Thanks I knew this actually but was wondering if there was nicer way of doing that than:
- class PlatformIconProvider : public QDeclarativeImageProvider
- {
- ...
- };
- {
- QImage result;
- if(result.load(QLatin1String("/usr/share/themes/blanco/meegotouch/icons/") + id + QLatin1String(".png"))) {
- qDebug() << "Loaded: " << id;
- }
- return result;
- }
See the example gallery [qt.gitorious.org] they use
- background: "image://theme/meegotouch-wallpaper-portrait";
for /usr/share/themes/blanco/meegotouch/images/backgrounds/meegotouch-wallpaper-portrait.jpg
So for example
- image://theme/icon-m-common-search
I confirm that this works for me.
You must log in to post a reply. Not a member yet? Register here!



