[Qt-interest] Aspect Ratio with QWidget::heightForWidth(int)

David Boddie david.boddie at nokia.com
Wed Jul 22 12:37:11 CEST 2009


Huseyin Kozan wrote:

> I tried to make a widget (and frame) which have a fixed ratio (I mean like
> square) .

[...]

> There is a quarterly document here:
> http://doc.trolltech.com/qq/qq04-height-for-width.html
> But I couldnt work it.
> 
> What is the correct way to do this ?

Have you tried implementing sizeHint() in the way shown in the article?
Does that work?

David
-- 
David Boddie
Senior Technical Writer
Nokia, Qt Software



More information about the Qt-interest-old mailing list