Results 1 to 3 of 3

Thread: Keep aspect size policy?

  1. #1
    Join Date
    Feb 2006
    Location
    US
    Posts
    173
    Thanks
    16
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Keep aspect size policy?

    Hello,

    Is there a keep aspect size policy that can be set for a dialog? If not, why not?

    I don't see any such option in Designer or the API.

    Thanks,
    Ben

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Keep aspect size policy?

    I don't know such an option, but you can easily watch Size changes through resizeEvent(QResizeEvent *event) and set your appropriate width or hight according to the other.

  3. The following user says thank you to Lykurg for this useful post:

    brcain (21st April 2009)

  4. #3
    Join Date
    Feb 2006
    Location
    US
    Posts
    173
    Thanks
    16
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Keep aspect size policy?

    Yea, figured as much, but that just seems clunky IMHO. It'd be nice to be able to set this policy for any widget in Designer.

    Thanks for reply.
    Last edited by brcain; 21st April 2009 at 17:22.

Similar Threads

  1. Problem with Size Policy of derived QWidget
    By eehmke in forum Qt Programming
    Replies: 6
    Last Post: 12th November 2008, 13:43
  2. Size Policy Problem
    By SenSej in forum Newbie
    Replies: 0
    Last Post: 28th October 2008, 14:13
  3. QLabel size policy
    By Caius Aérobus in forum Qt Programming
    Replies: 3
    Last Post: 7th December 2007, 17:57
  4. QScrollView size policy?
    By Henrikas[MI] in forum Qt Programming
    Replies: 1
    Last Post: 19th November 2006, 10:52
  5. QMenuBar size policy
    By krivenok in forum Qt Programming
    Replies: 3
    Last Post: 16th January 2006, 15:13

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.