hi,
i have a program that load a qml file from it's resource and loads an external resource file that contains the theme of the application.
the qml file is loaded but it can't find the theme qml file.
here's some code (not sure i'm really clear)
QDeclarativeView viewer;
viewer.
setSource(QUrl("qrc:/mainGUI/qml/main.qml"));
QDeclarativeView viewer;
viewer.setSource(QUrl("qrc:/mainGUI/qml/main.qml"));
QResource::registerResource(QCoreApplication::applicationDirPath() + "/Theme/Theme");
To copy to clipboard, switch view to plain text mode
and in the qml file:
import QtQuick 1.0
import "../../Theme"
Rectangle {
width: 900
height: 600
id:main
Theme{id:theme}
}
import QtQuick 1.0
import "../../Theme"
Rectangle {
width: 900
height: 600
id:main
Theme{id:theme}
}
To copy to clipboard, switch view to plain text mode
the import doesn't even work but it works when i include the Theme dir into the embeded resource.
i used qdiriterator to list the content of ":/" and all my files are in place
Bookmarks