Hi.
I'm having some troubles to stretch a widget on the screen.
On my QmainWindow I create a Qwidget that I use as centralWidget.
On my this QWidget( in my code mainWidget), I set a QHBoxlayout.
In this HBoxlayout, I add 2 items, one is a QVBoxlayout, and another is an Widget, wich has an QGraphicsView and Scene.
When I add the widget like this:
m_centralWidget
= new QWidget(this);
[...]
m_hboxlay->addLayout(m_vboxlay,0);
m_hboxlay->addWidget(m_bordWidget,1);
setCentralWidget(m_centralWidget);
m_centralWidget = new QWidget(this);
m_hboxlay = new QHBoxLayout(m_centralWidget);
m_vboxlay = new QVBoxLayout();
[...]
m_hboxlay->addLayout(m_vboxlay,0);
m_hboxlay->addWidget(m_bordWidget,1);
setCentralWidget(m_centralWidget);
To copy to clipboard, switch view to plain text mode
I get something like this:

As marked on the image with a red arrow, I would like to have that my bordWidget is stretched so it occupies the whole screen. I could set a fixedSize(int, int), but then on other resolutions, it would not fit.
Can someone point me out how to do this?
Thanks in advance,
Spitz
Bookmarks