Qt Creator: Widgets are not added to h file
Qt Creator and other tools
2
Posts
2
Posters
2.3k
Views
1
Watching
-
wrote on 19 Oct 2011, 21:16 last edited by
Hello,
I created a "Qt Gui Application" project with Qt creator 2.3.1
The project creates: main.cpp, mainwindow (cpp+h).
I added a "List Widget" to mainwindow.ui.
After saving and rebuild, the "List Widget" object is not added to mainwindow.h
Same with "Push Button" or any other widget.
I created a signal+slot that were not added to mainwindow.h.
I had to add them manually.
What is the reason for this ?
Thanks,
Zvika. -
wrote on 19 Oct 2011, 21:24 last edited by
the widgets are added to your ui class, you can access them via the ui pointer or member variable:
@
// pointer
ui->pushButton->setText("bla");// member variable
ui.listWidget->clear();
@
2/2