Hi all,
stupid question. I use QDesigner, drew a QMainWindow with a QWidget centralWidget. Inside, there's a layout and a couple of children (buttons, tables, etc.).
All the classes are autogenerated using QtCreator.
My TMainWindow class looks like this:
TMainWindow
::TMainWindow(QWidget *parent
) : ui(new Ui::TMainWindow)
{
ui->setupUi(this);
}
TMainWindow::TMainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::TMainWindow)
{
ui->setupUi(this);
}
To copy to clipboard, switch view to plain text mode
Now I want to connect one of the pushButtons to qApp() / quit. But every time I type in ui->..., I can't access the pushButtons.
When I open the designer form in QDesigner, the hierarchy is this:
TMainWindow
\-> centralWidget (QWidget)
____\-> gridLayout (QGridLayout)
________\-> btn_Quit (QPushButton)
However the centralWidget has this "forbidden" icon on the lower right corner. Does this have something to do with it and how do I access the children of centralWidget?
Thanks,
Stephan
Bookmarks