- class QSizeGrip¶
The
QSizeGrip
class provides a resize handle for resizing top-level windows. More…Synopsis¶
Methods¶
def
__init__()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
This widget works like the standard Windows resize handle. In the X11 version this resize handle generally works differently from the one provided by the system if the X11 window manager does not support necessary modern post-ICCCM specifications.
Put this widget anywhere in a widget tree and the user can use it to resize the top-level window or any widget with the Qt::SubWindow flag set. Generally, this should be in the lower right-hand corner.
Note that
QStatusBar
already uses this widget, so if you have a status bar (e.g., you are usingQMainWindow
), then you don’t need to use this widget explicitly. The same goes forQDialog
, for which you can just callsetSizeGripEnabled()
.On some platforms the size grip automatically hides itself when the window is shown full screen or maximised.
Note
On macOS, size grips are no longer part of the human interface guideline, and won’t show unless used in a
QMdiSubWindow
. Set another style on size grips that you want to be visible in main windows.Screenshot of a Fusion style size grip
A size grip widget at the bottom-right corner of a main window, shown in the Fusion widget style .
The
QSizeGrip
class inheritsQWidget
and reimplements themousePressEvent()
andmouseMoveEvent()
functions to feature the resize functionality, and thepaintEvent()
function to render the size grip widget.See also
Constructs a resize corner as a child widget of the given
parent
.