QT must clean project to rebuild QML file changes
Hi all,
I've faced a problem:
I write code in a project with QML file. When I change the QML file, the changes does not effect to the project when I press Run. And I have to "Clean" the project and rebuild, it takes time.
Anyone who have experience, could you show me the solution, many thanks for you :)
Re: QT must clean project to rebuild QML file changes
I think this link below is helpful for you, check it man
http://zchydem.enume.net/2011/08/04/...n-every-build/
Re: QT must clean project to rebuild QML file changes
I think better solution is to store QML files as regular files not in Qt resurces (Qt resurces makes file part of binary file).
Re: QT must clean project to rebuild QML file changes
Quote:
Originally Posted by
duc_bkav
Thanks duc_bkav,
I follow the instruction in your link, but it does not work, even if I manually run the command "touch quickflickr.png" before building the project :(.
Added after 4 minutes:
Quote:
Originally Posted by
MarekR22
I think better solution is to store QML files as regular files not in Qt resurces (Qt resurces makes file part of binary file).
Thanks MarekR22, I found this solution solved the problem.
My code is
Code:
QDeclarativeView view3;
view3.
setSource(QUrl::fromLocalFile("UI/testWithQML.qml"));
view3.show();
In my code, I use QUrl::fromLocalFile instead of using resource.
With this solution, I have to copy qml files to the destionation directory by add some command in build steps :)