I've got a complex dialog, and it is full of whitespace and I can't shrink it. In Designer, it has lots of components that then get dynamically hidden, and a few which are dynamically added. I've added dumping of size policies, size hints, and minimum sizes, but still can't figure out why Qt won't let me drag it smaller.
There must be some tools or techniques for troubleshooting this.
Please share.
I don't know of any tools for doing this, but I have managed it before by changing the palette of the different elements in the dialog, then looking at what is taking up more (or less) room than I expected, and focusing my investigation on those elements.
In a more general sense, make sure you've set the dialog to not be a fixed size. That bit me once as well.
You could capture QApplication::focusChanged(QWidget*,QWidget*) signal and change the background of currently focused widget. I think this would help to determine how much space each widget occupies.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With