[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] =?utf-8?q?Bug_in_QWidget=2Egeometry=28=29=3F?=
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2012-02-29 16:36:57
Message-ID: a2da9069353e61784742dd4efc447d56 () localhost
[Download RAW message or body]

On Wed, 29 Feb 2012 11:29:38 -0500, Nathan Weston <nathan@genarts.com>
wrote:
> According to the Qt docs, QWidget.geometry() should return the geometry 
> of the widget itself, not including the window border. But I'm finding 
> that's not the case -- geometry() is including the borders and returning

> the same value as frameGeometry().
> 
> However, setGeometry() behaves as documented, which has the interesting 
> side effect that window.setGeometry(window.geometry()) moves the window!
> 
> I'm using Qt 4.8.0 and PyQt 4.9 on Windows 7.
> 
> The attached test program demonstrates the problem. I use move() (which 
> *does* account for window borders) to position the window at the upper 
> left of the screen. But then a call to self.setGeometry(self.geometry())

> moves the window off screen.
> 
> Interestingly, the value of geometry() is the same before and after the 
> call to setGeometry(), despite the fact that the window has moved on
> screen.

If it's a bug it's a Qt bug, nothing to do with PyQt.

Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic