Reputation: 311
Is there any way to use system Android resources (images) in QML code?
Like images I see in ANDROID_SDK_DIR\platforms\android-xx\data\res\drawable-yyyy?
import QtQuick 2.3
import QtQuick.Controls 1.2
ApplicationWindow {
title: qsTr("Hello World")
width: Screen.width
height: Screen.height
visible: true
Image {
source: "file://android/image/drawable/ic_menu_more" // don't work
}
}
Upvotes: 1
Views: 348
Reputation: 24416
Qt Quick Controls' Android style already does this, and I believe that it's much more complicated than referring to an image on the file system - it involves some Java code, at the very least.
If you want to do something similar, I'd suggest checking out the links above; there's too much code to show here.
Upvotes: 1