ui_mainwindow.h does not update when adding something to the MainWindow
-
Hello, I'm new to Qt and I wanted to try to build something on my own but i noticed that whenever I add something to mainwindow.ui, the file ui_mainwindow.h does not update so when I try to refer to it (ui->label1) it says "No member named 'label1' in Ui::MainWindow.
(It is named "splashscreen" because I'm trying to make one for an app)
ui_splashscreen.h:
How do I fix this?
As I said at the beginning, I'm new and I don't know much about it. -
Hello, I'm new to Qt and I wanted to try to build something on my own but i noticed that whenever I add something to mainwindow.ui, the file ui_mainwindow.h does not update so when I try to refer to it (ui->label1) it says "No member named 'label1' in Ui::MainWindow.
(It is named "splashscreen" because I'm trying to make one for an app)
ui_splashscreen.h:
How do I fix this?
As I said at the beginning, I'm new and I don't know much about it.Build / Rebuild and
qmake
after you modify your*.ui
files. Then you can access your new stuff.Edit:
QMake is not even necessary but after a rebuild and qmake, everything should be up to date and your QLabel should be accessible from your code.
Btw: Don't edit the ui_xxx.h file, changes will get overwritten bymoc
/uic
anyway. -
Build / Rebuild and
qmake
after you modify your*.ui
files. Then you can access your new stuff.Edit:
QMake is not even necessary but after a rebuild and qmake, everything should be up to date and your QLabel should be accessible from your code.
Btw: Don't edit the ui_xxx.h file, changes will get overwritten bymoc
/uic
anyway.