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 bug : list of widgets in ui not updated in cpp code
Qt 6.11 is out! See what's new in the release blog

qt creator bug : list of widgets in ui not updated in cpp code

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 137 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.
  • Mr323M Offline
    Mr323M Offline
    Mr323
    wrote last edited by
    #1

    Hi. I'm new in Qt.
    Whenever I make new widget in .ui file and change the objectname of it , It will not appear in .cpp file ( not appear by ctrl+space )
    I was saved the project and rebuild it but the issue was not solved.
    So I have to close project and open it again to refresh list of widgets in .cpp

    Is it the Qt creator bug or should I have anything to update list of new widgets from .ui into .cpp ?

    Pl45m4P 1 Reply Last reply
    0
    • Mr323M Mr323

      Hi. I'm new in Qt.
      Whenever I make new widget in .ui file and change the objectname of it , It will not appear in .cpp file ( not appear by ctrl+space )
      I was saved the project and rebuild it but the issue was not solved.
      So I have to close project and open it again to refresh list of widgets in .cpp

      Is it the Qt creator bug or should I have anything to update list of new widgets from .ui into .cpp ?

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote last edited by Pl45m4
      #2

      @Mr323

      Hi and welcome,

      you need to make sure that you re-run the uic tool in your build.
      The user interface compiler translates your *.ui file into usable C++ headers

      • https://doc.qt.io/qt-6/uic.html

      It should run automatically if you have the AUTOUIC CMake property set, which should be the default when you create new projects via QtCreator's project wizard.

      • https://cmake.org/cmake/help/latest/prop_tgt/AUTOUIC.html

      Edit:

      Also, if your correct name is indeed in your header file, but won't be recognized in your code through ui->something, it's a code model / IntelliSense issue, which might take some time until it's updated.
      Just because it's not directly changed in the code model, it does not mean that the updated code will not compile.
      Might happens from time to time.


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      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