1

Is there anyway to get the correct frameGeometry for 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.

edA-qa mort-ora-y
  • 30,295
  • 39
  • 137
  • 267
  • I doubt there is a platform-independent way to tell the window system geometry (which is outside the control of Qt) of a widget not yet created in the windowing system. – Frank Osterfeld Dec 04 '10 at 16:28
  • @Frank, that may be true, but Qt is supposed to give me platform independence. And just from using other Apps it seems that all platforms do have a way of predicting the window geometry (in that windows are positioned prior to appearing on the screen). – edA-qa mort-ora-y Dec 04 '10 at 16:43

1 Answers1

0

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.

Caleb Huitt - cjhuitt
  • 14,785
  • 3
  • 42
  • 49
  • That appears to work on Windows, but on KDE somehow the window is always moved within range. I don't know if QT is doing that or KDE itself. – edA-qa mort-ora-y Dec 11 '10 at 11:03