QGroupBox is filled with too much space.
-
Hi
Have you tried with setMInimumHeight/Width instead of resize
as once a widget is in a layout, then the layout controls sizes.
But it respects Min/Max values. -
@Pippin
oh, hmm, it divides the area (of the container) between them.
You could insert a VerticalSpacer to push them up. -
@Pippin
Well you can set Maximum Height on the layout to force area smaller.It is possible to build using a widget as place holder.
Have a look at this.
https://www.dropbox.com/s/pdlb6jeph7iobc9/opper.zip?dl=0 -
Hi,
Maybe a silly question but since it's for IP addresses, why not use a QLineEdit ?
-
@SGaist Good point, I use QLineEdits now. My problem remains though: http://i.imgur.com/raW29vW.png
Neither
QVBoxLayout::addStretch
(result is unchanged) norQGroupBox::setMaximumHeight
(result: http://i.imgur.com/FklMI9g.png) seem to work here.I'd rather have the extra space disappear rather than add a spacer or something. The smaller the window, the better.
-
For the layout of your dialog, I think you should have a look at QFormLayout
-
Well never mind, I'll just drop the IP info so that there's no more bug.
It is absurd how Qt has that many bugs. Before coding tip-top things, Qt's coders should make sure that the most basic (BASIC) things actually work. I wish I didn't have to use Qt. It is so very overrated. Sorry for that, but I'm both exasperated and disappointed. That's not the first unsolvable problem I've come across.
-
You would put your QLineEdit and two QPushButton in a QHorizontalLayout. QFormLayout::addRow supports also layouts.