[SOLVED] Nested QML doesn't trigger a build



  • I wonder if I'm the only one having this problem. If I write some code in main.qml, then I refactor some of the code out into sub.qml; when I making changes to sub.qml and do a build the changes aren't picked up. I have to "touch" main.qml (adding a space character is good enough) and then the changes in sub.qml are noticed and built into the application. Also of course, doing a full rebuild also works. I entered a "bug report":https://bugreports.qt-project.org/browse/QTCREATORBUG-12295 for this back in May '14 but its priority has never changed from Not Evaluated. I tried adding a comment to it, and mentioning it to responders of other bugs I've entered that have gotten attention, but I get no responses. I would think this would be a fairly HUGE issue but I've never seen it mentioned here. I've had this as an issue since 4.8 and I'm currently using 5.3.2 (Qt Creator 3.2.1).



  • I never had this problem. When I make any change to a qml the change is also detected. If the file is included using qrc the binary is also changed. What do you expect to see? Qml files are not compiled like c++ source code.



  • Specifically if I have a file main.qml and it uses MyWidget{} and the qml for MyWidget is in MyWidget.qml. Any time I make changes to just MyWidget.qml the changes do not show up if I build and run. I have to go make some change to main.qml. I put all my qml inside qml.qrc. I'm just putting all of it at the / root level.

    This is under Windows 7.

    The referenced bug report has a small attached project that never fails to demonstrate the problem for me. I would think if the team couldn't replicate the bug the status would change to reflect that. It is interesting (to me) that you don't have this problem. Are you on Windows? Do you notice anything else different that you do from what I do?



  • Hi,

    I am using Windows 7 64bit with Qt5.3.2 (and the QtCreator that comes with it). I just downloaded the test project tried to follow your steps, but on my pc I can see the changes.

    What button are you using to run? The small green "play" button or the big green play button? Also I assume you saved your changes?



  • Hmmm, I must be confused about which version of Qt I was running. I currently have four of them installed for testing purposes. I just re-ran again in 5.3.2 and you are correct it is fixed.

    FYI, I don't typically save first and I do use the big green Run button on the mode selector panel. (I assume the little green one doesn't do a build just a run). I also used to see the same problem with the Build (hammer) icon. Saving first didn't help.

    It works fine now, thank you for responding and pointing that out. I'll see if I can kill or update the bug report. Just to make sure I'm not losing my mind I went back to 5.2.1 and the problem was there and is repeatable.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.