Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Regarding Qml
Qt 6.11 is out! See what's new in the release blog

Regarding Qml

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
12 Posts 4 Posters 5.4k Views 2 Watching
  • 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.
  • Naveen_DN Offline
    Naveen_DN Offline
    Naveen_D
    wrote on last edited by
    #1

    Hi all

    I have a basic doubt regarding qml. i am trying to develop my code using Qml, till now it was working fine but from yesterday, when i make small changes also i need to clean the code every time (before i was not doing this), even if small width change, i need to clean the code to update the changes in the output. if i don't clean the changes will not appear and the same previous code's output i get.
    What is the problem, can anyone suggest me the solution for this.

    Thanks

    Naveen_D

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      What have you changed in the meantime? Have you updated Qt or Qt Creator? Have you changed anything in your .pro file? Do you attach QML by filesystem path or using QRC?

      (Z(:^

      Naveen_DN 1 Reply Last reply
      0
      • sierdzioS sierdzio

        What have you changed in the meantime? Have you updated Qt or Qt Creator? Have you changed anything in your .pro file? Do you attach QML by filesystem path or using QRC?

        Naveen_DN Offline
        Naveen_DN Offline
        Naveen_D
        wrote on last edited by
        #3

        @sierdzio

        What have you changed in the meantime?

        i have not made any changes, i just used the updated code( the code was updated in other system).

        Have you changed anything in your .pro file? Do you attach QML by filesystem path or using QRC?

        no i have not changed the .pro file. i am attaching QML by QRC.

        Naveen_D

        sierdzioS 1 Reply Last reply
        0
        • Naveen_DN Naveen_D

          @sierdzio

          What have you changed in the meantime?

          i have not made any changes, i just used the updated code( the code was updated in other system).

          Have you changed anything in your .pro file? Do you attach QML by filesystem path or using QRC?

          no i have not changed the .pro file. i am attaching QML by QRC.

          sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          @Naveen_D said in Regarding Qml:

          i just used the updated code( the code was updated in other system).

          Perhaps the .pro.user file from that other system was copied into yours and messed up the config? Try removing the .pro.user file, then rebuild your project.

          Otherwise I see no reason why it should suddenly stop working.

          (Z(:^

          Naveen_DN 1 Reply Last reply
          0
          • sierdzioS sierdzio

            @Naveen_D said in Regarding Qml:

            i just used the updated code( the code was updated in other system).

            Perhaps the .pro.user file from that other system was copied into yours and messed up the config? Try removing the .pro.user file, then rebuild your project.

            Otherwise I see no reason why it should suddenly stop working.

            Naveen_DN Offline
            Naveen_DN Offline
            Naveen_D
            wrote on last edited by
            #5

            @sierdzio ya i did that, even changed the .pro file name and again restarted, the same issue continues

            Naveen_D

            E 1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              hm, no idea then, sorry :-(

              (Z(:^

              1 Reply Last reply
              0
              • Naveen_DN Naveen_D

                @sierdzio ya i did that, even changed the .pro file name and again restarted, the same issue continues

                E Offline
                E Offline
                Eeli K
                wrote on last edited by
                #7

                @Naveen_D If I understood correctly your changes in .qml files aren't reflected in the application when you run it. I have run into that kind of problem under certain conditions, I don't remember what, but it was always cured by deleting the build directory and building again. Clean&rebuild isn't always enough.

                Naveen_DN 1 Reply Last reply
                0
                • E Eeli K

                  @Naveen_D If I understood correctly your changes in .qml files aren't reflected in the application when you run it. I have run into that kind of problem under certain conditions, I don't remember what, but it was always cured by deleting the build directory and building again. Clean&rebuild isn't always enough.

                  Naveen_DN Offline
                  Naveen_DN Offline
                  Naveen_D
                  wrote on last edited by
                  #8

                  @Eeli-K I deleted the build directory, renamed the .pro file, changed the location of that file in my system. still the same issue. don't know what else i want to do to resolve this.

                  Naveen_D

                  E C 2 Replies Last reply
                  0
                  • Naveen_DN Naveen_D

                    @Eeli-K I deleted the build directory, renamed the .pro file, changed the location of that file in my system. still the same issue. don't know what else i want to do to resolve this.

                    E Offline
                    E Offline
                    Eeli K
                    wrote on last edited by
                    #9

                    @Naveen_D It's possible that the qml file is cached (see http://doc-snapshots.qt.io/qt5-5.9/qtquick-deployment.html#qml-caching) and there's a bug which prevents the system seeing that the file is changed. What happens if you find the cache by adding

                    #include <QStandardPaths>
                    #include <QDebug>
                    ...
                    qDebug() << QStandardPaths::standardLocations(QStandardPaths::CacheLocation);
                    

                    in your main.cpp and delete the qml cache before running but without doing clean?

                    Naveen_DN 1 Reply Last reply
                    0
                    • Naveen_DN Naveen_D

                      @Eeli-K I deleted the build directory, renamed the .pro file, changed the location of that file in my system. still the same issue. don't know what else i want to do to resolve this.

                      C Offline
                      C Offline
                      Curtwagner1984
                      wrote on last edited by
                      #10

                      @Naveen_D Might be silly, but did you run QMake after cleaning? I had the exact same issue, I did 'clean' and then 'build', it didn't help. I deleted the build folder, it didn't help. But then I cleaned and ran QMake and now it seems to be updating normally.

                      1 Reply Last reply
                      0
                      • E Eeli K

                        @Naveen_D It's possible that the qml file is cached (see http://doc-snapshots.qt.io/qt5-5.9/qtquick-deployment.html#qml-caching) and there's a bug which prevents the system seeing that the file is changed. What happens if you find the cache by adding

                        #include <QStandardPaths>
                        #include <QDebug>
                        ...
                        qDebug() << QStandardPaths::standardLocations(QStandardPaths::CacheLocation);
                        

                        in your main.cpp and delete the qml cache before running but without doing clean?

                        Naveen_DN Offline
                        Naveen_DN Offline
                        Naveen_D
                        wrote on last edited by
                        #11

                        @Eeli-K

                        #include <QStandardPaths>
                        #include <QDebug>
                        ...
                        qDebug() << QStandardPaths::standardLocations(QStandardPaths::CacheLocation);

                        i went to this path and removed the cache. Even then the changes won't reflect in the application without cleaning.

                        @Curtwagner1984
                        I have tried that also running qmake and then launching the application. but didn't work.

                        Naveen_D

                        E 1 Reply Last reply
                        0
                        • Naveen_DN Naveen_D

                          @Eeli-K

                          #include <QStandardPaths>
                          #include <QDebug>
                          ...
                          qDebug() << QStandardPaths::standardLocations(QStandardPaths::CacheLocation);

                          i went to this path and removed the cache. Even then the changes won't reflect in the application without cleaning.

                          @Curtwagner1984
                          I have tried that also running qmake and then launching the application. but didn't work.

                          E Offline
                          E Offline
                          Eeli K
                          wrote on last edited by Eeli K
                          #12

                          @Naveen_D This sounds really strange. If you delete the build directory all will be built from scratch, it should be more efficient than clean&build, especially if cache isn't to blame.

                          In the build directory there's either debug/ or release/ directory, under that there's qrc_qml.cpp (and corresponding qrc_qml.o) file. Save it and compare it with the new one after building without cleaning. Does the diff tool reveal differences? With the cleaning phase they at least should be different. (Edit: in Creator there's a diff tool under Tools.)

                          If your project is closed source it's difficult to debug the problem. Otherwise you could give us a chance to test it. If the problem persists when others try it it's most probably a bug somewhere in Qt or in the build system.

                          You could also try to build it manually from command line.

                          BTW, you haven't told your Qt and Creator versions. It may be crucial.

                          1 Reply Last reply
                          0

                          • Login

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