Project description:
My qml-desktop-applications uses the Qt Quick components for Desktop.
I compile all files from the desktop-components into a resource-file (which is embedded in the .exe-file).
The main.qml-file is loaded from the resources like this:
viewer.
setSource(QUrl("qrc:/main.qml"));
viewer.setSource(QUrl("qrc:/main.qml"));
To copy to clipboard, switch view to plain text mode
main.qml starts with this line which seems to make trouble:
import "desktop-components/components"
import "desktop-components/components"
To copy to clipboard, switch view to plain text mode
Observed behaviour:
- When I compile and execute the application everything works fine
- When I move my application to another directory (or PC), the application's main window never shows up.
- When I remove all desktop-components stuff and just define a simple Rectangle in main.qml it works.
- When I load the qml-file (and therefore the desktop-components from the file-system instead of the resource-file it works (viewer.setSource(QUrl("main.qml"));
- The problem doesn't occur when building my project for debug
- The problem doesn't occur on OSX
Project file-structure:
MyProject
|- release
| |- MyProject.exe
|
|- desktop-components
| |- components
|
|- main.qml
|
|- qmlapplicationviewer
Bookmarks