Following problem:

I want to display a widget in the middle of a QMdiSubWindow. I also want to use Tabs later. Therefore I add a QStackWidget to a QMdiSubWindow. The first QStackWidget is a Widget I constructed called inAOrifice. Now in the Fullscreenmode the inAOrifice Widget isnt that big and I want to display it in the middle of the QMdiSubWindow, in the QStackWidget respectively. It always appears in the left upper corner. Any suggestions? I have tried a lot already. Cant see my mistake…

Most common code yet …

Qt Code:
  1. MainChild::MainChild(QWidget *parent) : QMdiSubWindow(parent)
  2. {
  3. this->setAttribute(Qt::WA_DeleteOnClose);
  4.  
  5. inAOrifice = new inputAOrifice(this);
  6. stackLayout = new QVBoxLayout(this);
  7. stackWidget = new QStackedWidget;
  8.  
  9. stackWidget->addWidget(inAOrifice);
  10. stackLayout->setAlignment(stackWidget,Qt::AlignCenter);
  11. this->setWidget(stackWidget);
  12.  
  13. }
To copy to clipboard, switch view to plain text mode