revellix
24th July 2011, 20:25
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 …
MainChild::MainChild(QWidget *parent) : QMdiSubWindow(parent)
{
this->setAttribute(Qt::WA_DeleteOnClose);
inAOrifice = new inputAOrifice(this);
stackLayout = new QVBoxLayout(this);
stackWidget = new QStackedWidget;
stackWidget->addWidget(inAOrifice);
stackLayout->setAlignment(stackWidget,Qt::AlignCenter);
this->setWidget(stackWidget);
}
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 …
MainChild::MainChild(QWidget *parent) : QMdiSubWindow(parent)
{
this->setAttribute(Qt::WA_DeleteOnClose);
inAOrifice = new inputAOrifice(this);
stackLayout = new QVBoxLayout(this);
stackWidget = new QStackedWidget;
stackWidget->addWidget(inAOrifice);
stackLayout->setAlignment(stackWidget,Qt::AlignCenter);
this->setWidget(stackWidget);
}