Results 1 to 2 of 2

Thread: QWidget with fixed width height ratio

  1. #1
    Join Date
    May 2009
    Posts
    21
    Thanks
    4
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QWidget with fixed width height ratio

    Hi,

    I have implemented my own widget plugin for Qt Designer. When resizing the widget in Qt Designer I want the width height ratio to be fix (1:1). I have reimplementet the resizeEvent doing a resize to 1:1. But I'm not really satisfied with this solution.

    Is there a more appropriate way to keep the ratio?

    Thank you in advance

    Markus

  2. #2
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QWidget with fixed width height ratio

    try using heightForWidth form of functions..should resolve your problem

Similar Threads

  1. Replies: 9
    Last Post: 13th June 2012, 15:42
  2. Replies: 6
    Last Post: 14th April 2009, 17:40
  3. QLayout: different SizeConstraints for width and height?
    By PhilippB in forum Qt Programming
    Replies: 0
    Last Post: 23rd February 2009, 16:33
  4. Pixmap height / width without loading it
    By bunjee in forum Qt Programming
    Replies: 1
    Last Post: 29th November 2007, 07:10
  5. width and height of QTabWidget
    By chikkireddi in forum Qt Programming
    Replies: 6
    Last Post: 29th October 2007, 13:53

Tags for this Thread

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.