Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Creator won't detect last changes
Forum Update on Monday, May 27th 2025

Qt Creator won't detect last changes

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 5 Posters 3.1k 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.
  • SamurayHS Offline
    SamurayHS Offline
    SamurayH
    wrote on last edited by
    #1

    Hey everyone,
    I don't know what prevents Qt Creator from building my project recently. It worked great, but now every time I add some changes in the code (of one of my project files *cpp, *h, *ui), and I click on Build & Run as usual, the changes aren't added. For example, I change the title of my MainWindow, I build and run, and nothing changes! Like if you click on run.
    I tried Clean, Clean All, qmake, reboot (my PC), close Qt Creator and restart... but unfortunately none of them had solved my issue.

    I'm using Qt Creator v4.5.0, Qt 5.10.
    I will appreciate your help.

    "قال رسول الله صلى الله عليه وسلم : " أحب الناس إلى الله أنفعهم للناس

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Might be a silly question but did you had auto-save enabled and now it's not the case anymore ?

      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
      • SamurayHS Offline
        SamurayHS Offline
        SamurayH
        wrote on last edited by
        #3

        Do you mean this :
        0_1530573272919_dd.PNG
        It was already enabled, and I also tried to saveAll, it's really a silly question!
        However, thanks for the quick reply.

        "قال رسول الله صلى الله عليه وسلم : " أحب الناس إلى الله أنفعهم للناس

        1 Reply Last reply
        0
        • SamurayHS Offline
          SamurayHS Offline
          SamurayH
          wrote on last edited by SamurayH
          #4

          The problem disappeared finally, after closing Qt Creator and restarting it, and deleting debugging folder. However, I still ignore what happened. Anyway, I will mark that topic as solved, hoping that that silly problem never come back again.

          Have a good day.

          "قال رسول الله صلى الله عليه وسلم : " أحب الناس إلى الله أنفعهم للناس

          1 Reply Last reply
          0
          • GerhardG Offline
            GerhardG Offline
            Gerhard
            wrote on last edited by
            #5

            Hello,

            are your sources or the build Folder on a Network drive ? check the System times!

            Gerhard

            1 Reply Last reply
            1
            • SamurayHS Offline
              SamurayHS Offline
              SamurayH
              wrote on last edited by
              #6

              Hi @Gerhard,
              The build folder and sources are all on my PC's hard drive 'C:'. For "check System times" maybe you're right, because the problem occurred when I started testing a function that deal with date changes (in my program I need to have a save file each day), and to test it, I was changing the date of my PC randomly. But I don't know how that would affect Qt Creator.

              "قال رسول الله صلى الله عليه وسلم : " أحب الناس إلى الله أنفعهم للناس

              aha_1980A 1 Reply Last reply
              0
              • SamurayHS SamurayH

                Hi @Gerhard,
                The build folder and sources are all on my PC's hard drive 'C:'. For "check System times" maybe you're right, because the problem occurred when I started testing a function that deal with date changes (in my program I need to have a save file each day), and to test it, I was changing the date of my PC randomly. But I don't know how that would affect Qt Creator.

                aha_1980A Offline
                aha_1980A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @SamurayH

                creator uses make (in one of its derivates) to compile your app.

                make simply compiles every source file that is newer than the corresponding object file. otherwise it stays as is until you delete the object file, aka rebuild.

                Qt has to stay free or it will die.

                SamurayHS 1 Reply Last reply
                3
                • aha_1980A aha_1980

                  @SamurayH

                  creator uses make (in one of its derivates) to compile your app.

                  make simply compiles every source file that is newer than the corresponding object file. otherwise it stays as is until you delete the object file, aka rebuild.

                  SamurayHS Offline
                  SamurayHS Offline
                  SamurayH
                  wrote on last edited by
                  #8

                  @aha_1980
                  Honestly, I didn't get your point.

                  "قال رسول الله صلى الله عليه وسلم : " أحب الناس إلى الله أنفعهم للناس

                  jsulmJ 1 Reply Last reply
                  0
                  • SamurayHS SamurayH

                    @aha_1980
                    Honestly, I didn't get your point.

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by jsulm
                    #9

                    @SamurayH You should read about make tool. make is a tool to build software projects using Makefile files. QtCreator itself does NOT compile anything. It simply calls qmake which creates Makefile files and then make is called. make calls then compiler and linker to build your software project. Every time you (or QtCreator) call make it checks which source files are newer than the object files made out of them. Then it compiles all source files which are newer. Example:

                    source_1.cpp is compiled to source_1.o object file
                    source_1.cpp --> source_1.o
                    
                    // Here make would not compile source_1.cpp as the source_1.o is newer, so source_1.cpp is unchanged
                    source_1.cpp - 11:00 04.07.18
                    source_1.o   - 11:01 04.07.18
                    
                    // Now you change source_1.cpp
                    source_1.cpp - 12:00 04.07.18
                    source_1.o   - 11:01 04.07.18
                    // If you now call make it will detect that source_1.cpp is newer (changed) and it will compile it (it will call the compiler)
                    

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    7
                    • SamurayHS Offline
                      SamurayHS Offline
                      SamurayH
                      wrote on last edited by
                      #10

                      @jsulm
                      Thanks for clarifying.

                      So now everything is clear. Like @Gerhard said: "check the System times!".
                      I was telling make that the source file is not newer, by editing it in 05/07/2018 (because I forgot to reset the date after changing it earlier), and then I remember that the date has to be reset to 04/07/2018, and then saving and building.

                      Thanks, all!

                      "قال رسول الله صلى الله عليه وسلم : " أحب الناس إلى الله أنفعهم للناس

                      1 Reply Last reply
                      1

                      • Login

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