Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
无论如何要为尚未调用 show() 的窗口获取正确的 frameGeometry 吗?一般来说,在屏幕上显示窗口之前似乎 frameGeometry() == geometry()。
我不想先调用 show() 然后再移动,因为它会导致显示屏出现明显的闪烁。
显然我可以只取一些窗口(我创建的第一个窗口)并记住边框的大小等等,但我真的不敢相信没有标准的 QT 方法可以做到这一点。有吗?
我正在使用 Qt 4.6.3、Windows 7、(K)Ubuntu 10.04。
您可以尝试将窗口移到桌面区域之外,然后显示它。获得框架几何信息后,您可以将其移动到正确的位置,这与在该位置显示它的行为相同。