Window Geometry
QWidget provides several functions that deal with a widget's geometry. Some of these functions operate on the pure client area (i.e. the window excluding the window frame), others include the window frame. The differentiation is done in a way that covers the most common usage transparently.
- Including the window frame: x(), y(), frameGeometry(), pos(), and move().
- Excluding the window frame: geometry(), width(), height(), rect(), and size().
Note that the distinction only matters for decorated top-level widgets. For all child widgets, the frame geometry is equal to the widget's client geometry.
This diagram shows most of the functions in use:
本文介绍了QWidget中与窗口几何相关的各种函数,这些函数可以帮助开发者更好地管理窗口的大小和位置,包括考虑窗口边框的情况。
500

被折叠的 条评论
为什么被折叠?



