Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Rebuild QML files when running
QtWS25 Last Chance

Rebuild QML files when running

Scheduled Pinned Locked Moved Qt Creator and other tools
qt creatorqmlrunbuild
2 Posts 2 Posters 1.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    scrolling
    wrote on 26 Aug 2015, 16:05 last edited by
    #1

    Hi everybody,

    I'm working in a little Qt Quick example, and I have two qml files:

    main.qml - Where I have a Windows element and a component defined in an external file (MyComponent.qml)

    MyComponent.qml - Where I define my component (it's just a Rectangle with a Text and another Rectangle inside)

    Both of them are added into qml.qrc file in "/" path (the qml.qrc file is added as RESOURCE in the .pro file)

    Well, the problem is that when I make changes in MyComponent.qml and press "Run" or "Build Project", the changes are left out in the running program, I need to "Rebuild" to make any mínimum change in "MyComponent.qml" be considered. Why this happen?

    It's like any other qml files than main.qml are not recompilated when build or run the program.

    How can I make Qt Creator recompiles (or consider) all my qml files when Running or Building the Project?

    Thank you and sorry for my poor english.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 26 Aug 2015, 20:28 last edited by
      #2

      Hi,

      Because the qml files you have are compiled in your application when using qrc. That's why you have to build your application before you can see the changes.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      1/2

      26 Aug 2015, 16:05

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved