PDA

View Full Version : Limit window size to certain ranges



markwestcott
26th June 2009, 10:24
Hi there,

I've got a window that I want to allow resizing to only specific sizes - say either 50 pixels or anything greater than 100 pixels. (Certain widgets will be hidden when it's down to 50 pixels)

Can't work out how to do this. Installing an event filter and stopping QResizeEvent where size isn't in the range doesn't help. I think maybe I have to write a QLayout, but can't really work out how I'd achieve what I'm after?

Many thanks in advance,

Mark

nish
26th June 2009, 10:50
QWidget::setMinimumSize(),QWidget::setMaximumSize( )