Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QtCreator keys shortcuts scripts



  • hello there,
    In Qt Creator I often need to run this sequence:

    • Clean
    • Qmake
    • Rebuild

    Its a bit redundant, but that's not the case. I was wondering either it is possible, to somehow create a keyboard shortcut that would run all of those commands for me, one by one.

    I would appreciate all help.



  • if you go in projects then on the build settings - here you can add all the steps that you want.. if you miss any just click in add build step.. and make your own build steps



  • If you use the most recent version of Qt Creator Build->Rebuild All or right click on the project->rebuild does all those steps



  • The thing is, the qmake in build step works somehow different. I want to force the qmake and in buildstep its sometimes ommited:

    14:23:24: The process "C:\Qt\Tools\mingw730_64\bin\mingw32-make.exe" exited normally.
    14:23:24: Configuration unchanged, skipping qmake step.
    14:23:24: Starting: "C:\Qt\Tools\mingw730_64\bin\mingw32-make.exe" -j12
    

    If I manually run qmake on the project, its always done:

    14:25:23: Running steps for project ntm_client...
    14:25:23: Starting: "C:\Qt\5.12.3\mingw73_64\bin\qmake.exe" C:\storage\repo\bergen\MDE-Clients\ntm_client\ntm_client.pro -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug"
    14:25:24: The process "C:\Qt\5.12.3\mingw73_64\bin\qmake.exe" exited normally.
    14:25:24: Starting: "C:\Qt\Tools\mingw730_64\bin\mingw32-make.exe" -f C:/storage/repo/bergen/MDE-Clients/build-ntm_client-Desktop_Qt_5_12_3_MinGW_64_bit-Debug/Makefile qmake_all
    mingw32-make: Nothing to be done for 'qmake_all'.
    14:25:24: The process "C:\Qt\Tools\mingw730_64\bin\mingw32-make.exe" exited normally.
    14:25:24: Elapsed time: 00:02.
    


  • @Bremenpl
    when I'm running in the same problem as you, I always delete the build folder and like that, I'm forcing Qt to do all the steps all over again - the downside is that it will take more time... the good news is that it will be the best option to avoid any error
    so consider deleting your build folder before you rebuild it...


  • Lifetime Qt Champion

    @Bremenpl and @arsinte_andrei, as @VRonin said, in next Creator 4.10 this will work with simple rebuild. In older versions, you have to do it by hand.

    Regards


Log in to reply