Why are changes to the QML code sometimes not reflected when hitting 'Run' and how to solve it?

六眼飞鱼酱① 提交于 2019-12-02 05:15:22

This is indeed a bug in QMake. As @Mitch posted in his comment, a bug report was already filed: bugreports.qt.io/browse/QTBUG-13334

If you read through the comments in that bug report, a workaround for the problem was posted. Have been using it for a couple of months now and it seems to fix the issue. All you have to do is paste this at the end of your pro file.

#update qml
qml_scenes.depends = $$PWD/resources/scene1.qml $$PWD/resources/scene2.qml ...
qml_scenes.commands =
QMAKE_EXTRA_TARGETS += qml_scenes
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!