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. Issues with QT Designer
Qt 6.11 is out! See what's new in the release blog

Issues with QT Designer

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 734 Views 1 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.
  • HunterMetcalfeH Offline
    HunterMetcalfeH Offline
    HunterMetcalfe
    wrote on last edited by
    #1

    Good afternoon,

    I'm having an issue with QT designer where I add, say, a button or label. When I attempt to edit the associated .cpp file, the button or label cannot be found or compiled with. When I comment out any reference to the label or button, compile and run, the GUI is an old copy without the addition of the new labels; however, I can see them in designer. I've done a clean, qmake, and rebuild. I'm not entirely sure what is causing the disconnect with the designer. Any suggestions?

    Thanks

    1 Reply Last reply
    0
    • Venkatesh VV Offline
      Venkatesh VV Offline
      Venkatesh V
      wrote on last edited by
      #2

      Hi @HunterMetcalfe
      need some more detail about your query to understand what happening.
      can you paste your piece of code here.

      1 Reply Last reply
      2
      • HunterMetcalfeH Offline
        HunterMetcalfeH Offline
        HunterMetcalfe
        wrote on last edited by
        #3

        It's not entirely code based. In the designer I drag and drop in a new QLabel called label. Then in my MainWindow.cpp, I attempt to do, ui->label->(some function). However, the compiler cannot find the reference to label in the ui_MainWindow.h file. That is the issue. The ui_MainWindow.h file is not being updated properly.

        1 Reply Last reply
        0
        • HunterMetcalfeH Offline
          HunterMetcalfeH Offline
          HunterMetcalfe
          wrote on last edited by
          #4

          I have solved the issue here. In the Projects section on the left pane of QT, the option for Shadow build was selected. Unselecting this option corrected the issues with the ui_MainWindow.h files not being generated properly.

          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