[SOLVED] Qt Quick Application: empty window
Default project ‘Qt Quick Application’ created and maked. It shows “Hello World” on ‘Ctrl+R’, but exe running give empty window. Any idea? Thanks!
5 replies
Unfortuantely the default project does not pack the qml file into a resource. That means the qml-file may get lost easily. The build script has deployment options to copy the qml file, however I find this very brittle. Bottom line:
- Make sure that the qml file is located where it is expected by the executable.
- To get a stable solution put the qml file in a resource.
Sure:
Select in Creator: File->New->Qt->Resource file
This will add a resource file to your project and give you a graphical editor that permits to select files which will be included in the binary file. Next step is to access the files that reside inside your executable:
As URL:
- QDeclarativeView view;
To access the file itself:
You must log in to post a reply. Not a member yet? Register here!


