How to display Widgets in the midle of a Window
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 …
- {
- inAOrifice = new inputAOrifice(this);
- stackWidget = new QStackedWidget;
- stackWidget->addWidget(inAOrifice);
- this->setWidget(stackWidget);
- }
EDIT:
isnt it used when I call with parent widget…
stackLayout = new QVBoxLayout(this);
I already tried to set the Layout with
this->setLayout…. no effect. the widget doesnt appear.
1 reply
You must log in to post a reply. Not a member yet? Register here!


