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. Delay in code section when I change the widget name in Object explorer?
Forum Updated to NodeBB v4.3 + New Features

Delay in code section when I change the widget name in Object explorer?

Scheduled Pinned Locked Moved Unsolved General and Desktop
27 Posts 3 Posters 3.7k 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.
  • aha_1980A aha_1980

    Hi @Mucip,

    do you have the Clange Code Model activated? (In Help > About Plugins)

    Changes in the GUI are stored in the window.ui files, which cannot be compiled. Therefore, a tool called uic creates a "ui_window.h" file that contains your dialogs logic and is then compiled with your app.

    With the classic code model, Creator does this compiling already in RAM, so the code model can provide the completions before you actually compile. With Clang, it seems this is not working as well, so I most often compile my code to get the completion back.

    I know, that's rather a workaround then a solution, but maybe it helps you.

    Edit: I just tested it again, and for the small example it worked well, even with Clang (Creator 4.9). So it seems things have improved :)

    MucipM Offline
    MucipM Offline
    Mucip
    wrote on last edited by
    #3

    Hi @aha_1980 ,
    Yes, it's active...

    I use 4.9 too. But I need to run first still?!... :(

    Regards,
    Mucip:)

    aha_1980A 1 Reply Last reply
    0
    • MucipM Mucip

      Hi @aha_1980 ,
      Yes, it's active...

      I use 4.9 too. But I need to run first still?!... :(

      Regards,
      Mucip:)

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

      @Mucip

      On which operating system are you? I tested a minimal Qt Widgets project on Linux.

      Qt has to stay free or it will die.

      MucipM 1 Reply Last reply
      0
      • aha_1980A aha_1980

        @Mucip

        On which operating system are you? I tested a minimal Qt Widgets project on Linux.

        MucipM Offline
        MucipM Offline
        Mucip
        wrote on last edited by
        #5

        Hi @aha_1980 ,
        Unfortunatelly I must use Windows... :(

        Regards,
        Mucip:)

        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #6

          Hi
          Same for me in Windows with Creator 4.9
          i have to press shift+ctrl+b to have it pick up
          any newly added widgets/renames and show in auto complete dropdown.
          Else the old are still shown.

          With clang off, switching back to code with shift +f4, it's
          already updated in autocomplete.

          aha_1980A 1 Reply Last reply
          2
          • mrjjM mrjj

            Hi
            Same for me in Windows with Creator 4.9
            i have to press shift+ctrl+b to have it pick up
            any newly added widgets/renames and show in auto complete dropdown.
            Else the old are still shown.

            With clang off, switching back to code with shift +f4, it's
            already updated in autocomplete.

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

            @mrjj that confirms my observation, that Clang works better on Linux.

            Anyone wanting to create a bugreport?

            Qt has to stay free or it will die.

            mrjjM 1 Reply Last reply
            0
            • aha_1980A aha_1980

              @mrjj that confirms my observation, that Clang works better on Linux.

              Anyone wanting to create a bugreport?

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #8

              @aha_1980
              But is it a bug ?
              On linux, it will be ready for auto-completion as soon as switching back to code?
              (i have older Creator on linux so could not test it )

              aha_1980A MucipM 2 Replies Last reply
              0
              • mrjjM mrjj

                @aha_1980
                But is it a bug ?
                On linux, it will be ready for auto-completion as soon as switching back to code?
                (i have older Creator on linux so could not test it )

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

                @mrjj

                On linux, it will be ready for auto-completion as soon as switching back to code?

                Yup. Same way as in former times with classic code model. I was impressed too :)

                Qt has to stay free or it will die.

                1 Reply Last reply
                0
                • mrjjM mrjj

                  @aha_1980
                  But is it a bug ?
                  On linux, it will be ready for auto-completion as soon as switching back to code?
                  (i have older Creator on linux so could not test it )

                  MucipM Offline
                  MucipM Offline
                  Mucip
                  wrote on last edited by
                  #10

                  Dear @mrjj ,
                  So what else? It works on Linux but doesn't work on windows?!...

                  Regards,
                  Mucip:)

                  mrjjM 1 Reply Last reply
                  0
                  • MucipM Mucip

                    Dear @mrjj ,
                    So what else? It works on Linux but doesn't work on windows?!...

                    Regards,
                    Mucip:)

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #11

                    @Mucip
                    thats why i asked. :)
                    If it also did not work like old times in Linux, it might be intended but seems not.
                    (and i sorely missed even build file is fast)
                    I will create a bug report.

                    MucipM 1 Reply Last reply
                    0
                    • mrjjM mrjj

                      @Mucip
                      thats why i asked. :)
                      If it also did not work like old times in Linux, it might be intended but seems not.
                      (and i sorely missed even build file is fast)
                      I will create a bug report.

                      MucipM Offline
                      MucipM Offline
                      Mucip
                      wrote on last edited by
                      #12

                      @mrjj said in Delay in code section when I change the widget name in Object explorer?:

                      I will create a bug report.

                      Hi,
                      Thanks a lot...

                      Regards,
                      Mucip:)

                      1 Reply Last reply
                      0
                      • mrjjM Offline
                        mrjjM Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on last edited by mrjj
                        #13

                        Hi
                        we need to talk a bit about this.

                        To be sure i used the same version in both Linux and windows, i removed my windows Qt versions and
                        installed the newest from the online installer. And now autocompletion works as in Linux.??

                        @Mucip
                        Could you please try
                        Make new default GUI project. ( with the wizard)
                        Click on MainWindow.ui to see form
                        Drop pushbutton on the form
                        press shift+f4 to switch to code
                        start type ui-> and then see if the button is listed ?
                        For me that works now in Windows with Creator 4.9
                        No need to run or compile.
                        It also picks up renames now. And i cannot reproduce it. :(

                        alt text

                        MucipM 1 Reply Last reply
                        1
                        • mrjjM mrjj

                          Hi
                          we need to talk a bit about this.

                          To be sure i used the same version in both Linux and windows, i removed my windows Qt versions and
                          installed the newest from the online installer. And now autocompletion works as in Linux.??

                          @Mucip
                          Could you please try
                          Make new default GUI project. ( with the wizard)
                          Click on MainWindow.ui to see form
                          Drop pushbutton on the form
                          press shift+f4 to switch to code
                          start type ui-> and then see if the button is listed ?
                          For me that works now in Windows with Creator 4.9
                          No need to run or compile.
                          It also picks up renames now. And i cannot reproduce it. :(

                          alt text

                          MucipM Offline
                          MucipM Offline
                          Mucip
                          wrote on last edited by Mucip
                          #14

                          @mrjj,
                          I shocked! I did what you write.
                          I put one lineEdit on the form and change name to lineEditName.
                          Then press Shift+F4 to code section. And I start to see ui->lineEditName.

                          So what is the problem now?! Why old created project works bad then?!...

                          Edit: I tryed old code and still same problem?! I need to run code first to see code compşlation of new added object?!
                          Very strange!!! :(

                          Regards,
                          Mucip:)

                          mrjjM 1 Reply Last reply
                          1
                          • MucipM Mucip

                            @mrjj,
                            I shocked! I did what you write.
                            I put one lineEdit on the form and change name to lineEditName.
                            Then press Shift+F4 to code section. And I start to see ui->lineEditName.

                            So what is the problem now?! Why old created project works bad then?!...

                            Edit: I tryed old code and still same problem?! I need to run code first to see code compşlation of new added object?!
                            Very strange!!! :(

                            Regards,
                            Mucip:)

                            mrjjM Offline
                            mrjjM Offline
                            mrjj
                            Lifetime Qt Champion
                            wrote on last edited by
                            #15

                            @Mucip
                            Hi
                            Tested some more.
                            Can you try something?
                            In your real project. Add a new button, name it "there"
                            shift to code
                            And then WAIT. count at least slowly to 30.
                            then type
                            ui->

                            I found out that in the larger projects, if you do it fast, it is not there
                            but then i went for coffee. and when i came back, it was in autocomplete.
                            I did not compile!
                            So Im starting to think its maybe just slower than we think.

                            MucipM 1 Reply Last reply
                            1
                            • mrjjM mrjj

                              @Mucip
                              Hi
                              Tested some more.
                              Can you try something?
                              In your real project. Add a new button, name it "there"
                              shift to code
                              And then WAIT. count at least slowly to 30.
                              then type
                              ui->

                              I found out that in the larger projects, if you do it fast, it is not there
                              but then i went for coffee. and when i came back, it was in autocomplete.
                              I did not compile!
                              So Im starting to think its maybe just slower than we think.

                              MucipM Offline
                              MucipM Offline
                              Mucip
                              wrote on last edited by
                              #16

                              Hi @mrjj,
                              I did what you advice and it's been 4 minutes and still nothing about ui->there?!... :(

                              Regards,
                              Mucip:)

                              mrjjM 1 Reply Last reply
                              1
                              • MucipM Mucip

                                Hi @mrjj,
                                I did what you advice and it's been 4 minutes and still nothing about ui->there?!... :(

                                Regards,
                                Mucip:)

                                mrjjM Offline
                                mrjjM Offline
                                mrjj
                                Lifetime Qt Champion
                                wrote on last edited by mrjj
                                #17

                                @Mucip
                                Thank you for testing :)
                                Ok, so yours clearly have another issue.
                                Can i ask how BIG your project is ?
                                is any of the files over 5MB?

                                Still trying to find a really large Qt project to try on.
                                Maybe Creators own source.

                                MucipM 1 Reply Last reply
                                0
                                • mrjjM mrjj

                                  @Mucip
                                  Thank you for testing :)
                                  Ok, so yours clearly have another issue.
                                  Can i ask how BIG your project is ?
                                  is any of the files over 5MB?

                                  Still trying to find a really large Qt project to try on.
                                  Maybe Creators own source.

                                  MucipM Offline
                                  MucipM Offline
                                  Mucip
                                  wrote on last edited by
                                  #18

                                  Hi @mrjj,
                                  There is still nothing! :(

                                  I have 86 cpp file in project and max size is 41 KB...

                                  Regards,
                                  Mucip:)

                                  mrjjM 1 Reply Last reply
                                  0
                                  • MucipM Mucip

                                    Hi @mrjj,
                                    There is still nothing! :(

                                    I have 86 cpp file in project and max size is 41 KB...

                                    Regards,
                                    Mucip:)

                                    mrjjM Offline
                                    mrjjM Offline
                                    mrjj
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #19

                                    Hi
                                    Well that is nothing. or far from 5 mb.

                                    I did notice while testing if there is anything it complains about with the
                                    red circles, sometimes it won't autocomplete.
                                    Im wondering if there is something in your project that stalls it.
                                    But i assume its for all UI files so that seems unlikely.

                                    However, if you are willing
                                    we could try
                                    https://wiki.qt.io/Qt_Creator_Clang_Code_Model
                                    (the windows part in the top. ) and then see if anything shows up in the log.
                                    DebugView is ultra small download so its not very time consuming.
                                    You do not have to read all of it. just the log part in top :)

                                    MucipM 1 Reply Last reply
                                    1
                                    • mrjjM mrjj

                                      Hi
                                      Well that is nothing. or far from 5 mb.

                                      I did notice while testing if there is anything it complains about with the
                                      red circles, sometimes it won't autocomplete.
                                      Im wondering if there is something in your project that stalls it.
                                      But i assume its for all UI files so that seems unlikely.

                                      However, if you are willing
                                      we could try
                                      https://wiki.qt.io/Qt_Creator_Clang_Code_Model
                                      (the windows part in the top. ) and then see if anything shows up in the log.
                                      DebugView is ultra small download so its not very time consuming.
                                      You do not have to read all of it. just the log part in top :)

                                      MucipM Offline
                                      MucipM Offline
                                      Mucip
                                      wrote on last edited by
                                      #20

                                      Hi @mrjj ,
                                      Well, I downloaded DebugView. But where is the log file to view in Debug View?...

                                      Regards,
                                      Mucip:)

                                      mrjjM 1 Reply Last reply
                                      1
                                      • MucipM Mucip

                                        Hi @mrjj ,
                                        Well, I downloaded DebugView. But where is the log file to view in Debug View?...

                                        Regards,
                                        Mucip:)

                                        mrjjM Offline
                                        mrjjM Offline
                                        mrjj
                                        Lifetime Qt Champion
                                        wrote on last edited by mrjj
                                        #21

                                        @Mucip
                                        hi
                                        did you also do the part with
                                        set QT_LOGGING_RULES=qtc.clang*=true
                                        set LIBCLANG_TIMING=1
                                        /fullpath/qtcreator.exe
                                        in a shell ?

                                        it should write inside DebugView, which you start FIRST and then
                                        the set stuff in shell and start creator.
                                        It should then write tons of stuff in DebugView

                                        alt text

                                        MucipM 1 Reply Last reply
                                        1
                                        • mrjjM mrjj

                                          @Mucip
                                          hi
                                          did you also do the part with
                                          set QT_LOGGING_RULES=qtc.clang*=true
                                          set LIBCLANG_TIMING=1
                                          /fullpath/qtcreator.exe
                                          in a shell ?

                                          it should write inside DebugView, which you start FIRST and then
                                          the set stuff in shell and start creator.
                                          It should then write tons of stuff in DebugView

                                          alt text

                                          MucipM Offline
                                          MucipM Offline
                                          Mucip
                                          wrote on last edited by
                                          #22

                                          Dear @mrjj,
                                          I did. And output is below...

                                          [6500] qtc.clangcodemodel.ipc: ====> DocumentVisibilityChangedMessage(, )
                                          [10236] qtc.clangbackend.server: ########## documentVisibilityChanged
                                          [10236] qtc.clangbackend.timers: ClangCodeModelServer::documentVisibilityChanged needed 0 ms
                                          [6500] qtc.clangcodemodel.ipc: ====> DocumentVisibilityChangedMessage(D:/Belgeler/Qt/CSI_Yonetim/bobinbul.cpp, D:/Belgeler/Qt/CSI_Yonetim/bobinbul.cpp, )
                                          [10236] qtc.clangbackend.server: ########## documentVisibilityChanged
                                          [10236] qtc.clangbackend.timers: ClangCodeModelServer::documentVisibilityChanged needed 0 ms
                                          [6500] qtc.clangcodemodel.ipc: ====> DocumentsOpenedMessage(FileContainer(D:/Belgeler/Qt/CSI_Yonetim/bobinbul.cpp, Utf8StringVector(-nostdinc, -nostdinc++, -fsyntax-only, -m32, -std=gnu++2a, -DQ_CREATOR_RUN, -isystem, D:\ProgramFiles\Qt\Tools\QtCreator\bin\clang\lib\clang\7.0.0\include, -I, D:\ProgramFiles\Qt\Tools\QtCreator\share\qtcreator\cplusplus\wrappedQtHeaders, -I, D:\ProgramFiles\Qt\Tools\QtCreator\share\qtcreator\cplusplus\wrappedQtHeaders\QtCore, -I, C:\temp\QtCreator-BtaIAa\clang-uiheader-jkidkG, -fmessage-length=0, -fdiagnostics-show-note-include-stack, -fretain-comments-from-system-headers, -fmacro-backtrace-limit=0, -ferror-limit=1000, -x, c++, -Wno-unknown-pragmas, -Wno-unknown-warning-option, -Wno-documentation-unknown-command, -Weverything, -Wno-c++98-compat, -Wno-c++98-compat-pedantic, -Wno-unused-macros, -Wno-newline-eof, -Wno-exit-time-destructors, -Wno-global-constructors, -Wno-gnu-zero-variadic-macro-arguments, -Wno-documentation, -Wno-shadow, -Wno-switch-enum, -Wno-missing-prototypes, -Wno-used-but-marked-unused, -fno-delayed-template-parsing), Utf8StringVector(C:\temp\QtCreator-BtaIAa\clang-uiheader-jkidkG), 1, , <C:/temp/qtc-clangsupport-arWBbF/unsavedfilecontent-bobinbul.cpp-iLrQhK>), D:/Belgeler/Qt/CSI_Yonetim/bobinbul.cpp, D:/Belgeler/Qt/CSI_Yonetim/bobinbul.cpp, )
                                          [10236] qtc.clangbackend.server: ########## documentsOpened
                                          [10236] qtc.clangbackend.translationunits: Creating TranslationUnit {1e092380-1720-45ff-92c0-61ca9c8f3560} for "bobinbul.cpp"
                                          [10236] qtc.clangbackend.jobs: [ bobinbul.cpp ] Adding Job<1,"bobinbul.cpp",UpdateAnnotations,PreviouslyParsed>
                                          [10236] qtc.clangbackend.jobs: [ bobinbul.cpp ] Adding Job<2,"bobinbul.cpp",UpdateExtraAnnotations,RecentlyParsed>
                                          [10236] qtc.clangbackend.jobs: [ bobinbul.cpp ] Not choosing due to dirty document: Job<2,"bobinbul.cpp",UpdateExtraAnnotations,RecentlyParsed>
                                          [10236] qtc.clangbackend.jobs: [ bobinbul.cpp ] Running Job<1,"bobinbul.cpp",UpdateAnnotations,PreviouslyParsed> with TranslationUnit {1e092380-1720-45ff-92c0-61ca9c8f3560}
                                          [10236] qtc.clangbackend.timers: ClangCodeModelServer::documentsOpened needed 63 ms
                                          [10236] qtc.clangbackend.timers: UpdateAnnotationsJobRunner needed 1608 ms
                                          [10236] qtc.clangbackend.translationunits: Updated {1e092380-1720-45ff-92c0-61ca9c8f3560} for "bobinbul.cpp" RecentlyParsed: {1e092380-1720-45ff-92c0-61ca9c8f3560} PreviouslyParsed: {1e092380-1720-45ff-92c0-61ca9c8f3560}
                                          [10236] qtc.clangbackend.jobs: [ bobinbul.cpp ] Finishing Job<1,"bobinbul.cpp",UpdateAnnotations,PreviouslyParsed>
                                          [10236] qtc.clangbackend.jobs: [ bobinbul.cpp ] Running Job<2,"bobinbul.cpp",UpdateExtraAnnotations,RecentlyParsed> with TranslationUnit {1e092380-1720-45ff-92c0-61ca9c8f3560}
                                          [10236] qtc.clangbackend.timers: UpdateExtraAnnotationsJobRunner needed 2 ms
                                          [10236] qtc.clangbackend.jobs: [ bobinbul.cpp ] Finishing Job<2,"bobinbul.cpp",UpdateExtraAnnotations,RecentlyParsed>
                                          [6500] qtc.clangcodemodel.ipc: ====> UnsavedFilesUpdatedMessage(FileContainer(C:/temp/QtCreator-BtaIAa/clang-uiheader-jkidkG/ui_tekliftensiparisolusturma.h, Utf8StringVector(), Utf8StringVector(), 0, , <C:/temp/qtc-clangsupport-arWBbF/unsavedfilecontent-ui_tekliftensiparisolusturma.h-AKrSXZ>), )
                                          [10236] qtc.clangbackend.server: ########## unsavedFilesUpdated
                                          [10236] qtc.clangbackend.timers: ClangCodeModelServer::unsavedFilesUpdated needed 0 ms
                                          [6500] qtc.clangcodemodel.ipc: ====> UnsavedFilesUpdatedMessage(FileContainer(C:/temp/QtCreator-BtaIAa/clang-uiheader-jkidkG/ui_tabakaolusturma.h, Utf8StringVector(), Utf8StringVector(), 0, , <C:/temp/qtc-clangsupport-arWBbF/unsavedfilecontent-ui_tabakaolusturma.h-SsGllm>), )
                                          [10236] qtc.clangbackend.server: ########## unsavedFilesUpdated
                                          [10236] qtc.clangbackend.timers: ClangCodeModelServer::unsavedFilesUpdated needed 0 ms
                                          [6500] qtc.clangcodemodel.ipc: ====> UnsavedFilesUpdatedMessage(FileContainer(C:/temp/QtCreator-BtaIAa/clang-uiheader-jkidkG/ui_stokgrupkod.h, Utf8StringVector(), Utf8StringVector(), 0, , <C:/temp/qtc-clangsupport-arWBbF/unsavedfilecontent-ui_stokgrupkod.h-qJEnEl>), )
                                          [10236] qtc.clangbackend.server: ########## unsavedFilesUpdated
                                          [10236] qtc.clangbackend.timers: ClangCodeModelServer::unsavedFilesUpdated needed 0 ms
                                          [6500] qtc.clangcodemodel.ipc: ====> UnsavedFilesUpdatedMessage(FileContainer(C:/temp/QtCreator-BtaIAa/clang-uiheader-jkidkG/ui_siparisbul.h, Utf8StringVector(), Utf8StringVector(), 0, , <C:/temp/qtc-clangsupport-arWBbF/unsavedfilecontent-ui_siparisbul.h-PKJDJq>), )
                                          [10236] qtc.clangbackend.server: ########## unsavedFilesUpdated
                                          [10236] qtc.clangbackend.timers: ClangCodeModelServer::unsavedFilesUpdated needed 0 ms
                                          [6500] qtc.clangcodemodel.ipc: ====> UnsavedFilesUpdatedMessage(FileContainer(C:/temp/QtCreator-BtaIAa/clang-uiheader-jkidkG/ui_irsaliyebul.h, Utf8StringVector(), Utf8StringVector(), 0, , <C:/temp/qtc-clangsupport-arWBbF/unsavedfilecontent-ui_irsaliyebul.h-TBnuZy>), )
                                          [10236] qtc.clangbackend.server: ########## unsavedFilesUpdated
                                          [10236] qtc.clangbackend.timers: ClangCodeModelServer::unsavedFilesUpdated needed 0 ms
                                          [6500] qtc.clangcodemodel.ipc: ====> UnsavedFilesUpdatedMessage(FileContainer(C:/temp/QtCreator-BtaIAa/clang-uiheader-jkidkG/ui_kullaniciyetkileri.h, Utf8StringVector(), Utf8StringVector(), 0, , <C:/temp/qtc-clangsupport-arWBbF/unsavedfilecontent-ui_kullaniciyetkileri.h-GLhilF>), )
                                          [10236] qtc.clangbackend.server: ########## unsavedFilesUpdated

                                          But When I run the project below message appear:

                                          15:18:08: Starting D:\Belgeler\qt\build-CSI_Yonetim-Desktop_Qt_5_10_1_MSVC2017_64bit-Debug\debug\CSI_Yonetim.exe ...
                                          15:18:08: Cannot retrieve debugging output.
                                          15:18:19: D:/Belgeler/qt/build-CSI_Yonetim-Desktop_Qt_5_10_1_MSVC2017_64bit-Debug/debug/CSI_Yonetim.exe exited with code 0
                                          

                                          I did not understand?...
                                          Regards,
                                          Mucip:)

                                          mrjjM 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