开发者

How to get frameGeometry without showing the window

Is there anyway to get the correct frameGeometry for 开发者_StackOverflow中文版a window for which show() has not yet been called? In general it seems that frameGeometry() == geometry() before a window is shown on the screen.

I don't want to call show() first and then move because it causes a noticeable flicker in the display.

Obviously I can just take some window (the first one I create) and remember the size of the borders and whatnot, but I really can't believe there isn't a standard QT way to do this. Is there one?

I'm using Qt 4.6.3, Windows 7, (K)Ubuntu 10.04.


You might try moving your window well outside the desktop area, then showing it. After you get the frame geometry information, you can move it to the proper position, which should act the same as showing it in that position.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜