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:
Qt Code:
  1. TMainWindow::TMainWindow(QWidget *parent) :
  2. QMainWindow(parent),
  3. ui(new Ui::TMainWindow)
  4. {
  5. ui->setupUi(this);
  6. }
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