[Qt-interest] resizeEvent get's only called _after_ resize

Murphy, Sean M. sean.murphy at gd-ais.com
Tue Jul 21 16:29:36 CEST 2009


I tried whipping up an example (attached) that does this, but I can't
get it to work either.  In my example, the widget should stay at a 2:1
ratio.  

What I'm noticing is if I grab the horizontal edge and increase the
widget's width, the ratio does not hold, but the *NEXT* horizontal
extension does take effect and the widget snaps to a 2:1 ratio.  If I
attempt to decrease the width of the widget, it does not snap to the 2:1
ratio.

Vertical extensions seem to have no effect whatsoever; I can resize the
widget vertically and the widget never snaps to 2:1.  Vertical decreases
appear to allow any ratio, until you attempt to decrease the height to
less than 1/2 the width, then the widget snaps back to the 2:1 ratio.

I'm not sure if there is some size policy setting that I'm missing or
what.
Sean

-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of
chris_honschu at gmx.de
Sent: Sunday, July 19, 2009 5:28 PM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] resizeEvent get's only called _after_ resize

On Sunday, 19. July 2009, Oliver Demetz wrote:

> I think you just got a small error in your code:

By trying to create a simple testcaste, this was a mistake and 
has been already fixed. 

> I'm not sure whether that was the only bug in your code but I
> hope it helps. Please be so kind to report when you got the
> code working.

The problem still exists.

Maybe it's not possible to set a ratio for the window itself?
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ratioWidgetTest.zip
Type: application/x-zip-compressed
Size: 1349 bytes
Desc: ratioWidgetTest.zip
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090721/62696ba7/attachment.bin 


More information about the Qt-interest-old mailing list