PDA

View Full Version : selectively disallow widget resizing



thomaspu
14th February 2008, 22:00
I've got a mainwindow item that I want to only allow resizing when dimensions meet certain criteria. I esseitially want a mainwindow that will "snap" to different dimensions. I'm not sure how to do this just yet. I know I can over-ride the resize event, but that only gets the event after the window is already resized.

Any suggestions?
Paul

marcel
14th February 2008, 22:09
You could post a custom event from the resize event. In the customEvent function(which you must override) you must look at the current window size and adjust it according to you policy.

Just an idea.

thomaspu
14th February 2008, 22:41
So after the window is resized, I'd fire off my custom event which would look at the geometry and resize my window accordingly... Isn't there a way to catch the window resizing and not allow it to resize at all in the first place until the cursor pulls it to a new position?

Just seems like I'd be kinda going in circles by resizing the window after its resized. Hmm
Paul