Hello,
it is my first time using the qt designer within the qt creator (version 0.9). I realized a small application with a button, a lineEdit and a label. For the button i createtd a slot to put the text from lineEdit into the textbox.
My Problem is, that i have to declare and connect the lineEdit and label by myself:
mainWindow.h:
|
Source code
|
1
2
3
|
private:
QLabel *ui_label;
QLineEdit *ui_lineEdit;
|
mainWindow.cpp
|
Source code
|
1
2
3
4
5
6
|
MainWindow::MainWindow(QWidget *parent, Qt::WFlags flags) : QMainWindow(parent, flags)
{
ui.setupUi(this);
ui_lineEdit = qFindChild<QLineEdit*>(this, "lineEdit");
ui_label = qFindChild<QLabel*>(this, "label");
}
|
Is there a option to create these declarations automatically?
Thanks for helping.