Results 1 to 3 of 3

Thread: selectively disallow widget resizing

  1. #1
    Join Date
    Nov 2006
    Posts
    86
    Thanks
    6
    Thanked 14 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default selectively disallow widget resizing

    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

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: selectively disallow widget resizing

    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.

  3. #3
    Join Date
    Nov 2006
    Posts
    86
    Thanks
    6
    Thanked 14 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: selectively disallow widget resizing

    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

Similar Threads

  1. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 11:35
  2. Resizing child Widget
    By Pragya in forum Qt Programming
    Replies: 1
    Last Post: 30th March 2007, 07:58
  3. Widget resizing problem
    By fwohlfert in forum Qt Programming
    Replies: 3
    Last Post: 23rd February 2006, 09:16

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.