|  | Home · All Classes · Modules

# QSizeGrip Class Reference
[QtGui module]

The QSizeGrip class provides a resize handle for resizing top-level windows. More...

Inherits QWidget.

### Methods

- __init__ (self, QWidget)
- bool event (self, QEvent)
- bool eventFilter (self, QObject, QEvent)
- hideEvent (self, QHideEvent)
- mouseMoveEvent (self, QMouseEvent)
- mousePressEvent (self, QMouseEvent)
- mouseReleaseEvent (self, QMouseEvent)
- moveEvent (self, QMoveEvent)
- paintEvent (self, QPaintEvent)
- setVisible (self, bool)
- showEvent (self, QShowEvent)
- QSize sizeHint (self)

## Detailed Description

The QSizeGrip class provides a resize handle for resizing top-level windows.

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 using QMainWindow), then you don't need to use this widget explicitly.

On some platforms the size grip automatically hides itself when the window is shown full screen or maximised.

| A size grip widget at the bottom-right corner of a main window, shown in the Plastique widget style.

The QSizeGrip class inherits QWidget and reimplements the mousePressEvent() and mouseMoveEvent() functions to feature the resize functionality, and the paintEvent() function to render the size grip widget.

See also QStatusBar and QWidget.windowState().

## Method Documentation

### QSizeGrip.__init__ (self, QWidget)

The QWidget argument, if not None, causes self to be owned by Qt instead of PyQt.

Constructs a resize corner as a child widget of the given parent.

### bool QSizeGrip.event (self, QEvent)

Reimplemented from QObject.event().

### bool QSizeGrip.eventFilter (self, QObject, QEvent)

Reimplemented from QObject.eventFilter().

### QSizeGrip.hideEvent (self, QHideEvent)

Reimplemented from QWidget.hideEvent().

### QSizeGrip.mouseMoveEvent (self, QMouseEvent)

Reimplemented from QWidget.mouseMoveEvent().

Resizes the top-level widget containing this widget. The mouse move event is passed in the event parameter.

### QSizeGrip.mousePressEvent (self, QMouseEvent)

Reimplemented from QWidget.mousePressEvent().

Receives the mouse press events for the widget, and primes the resize operation. The mouse press event is passed in the event parameter.

### QSizeGrip.mouseReleaseEvent (self, QMouseEvent)

Reimplemented from QWidget.mouseReleaseEvent().

### QSizeGrip.moveEvent (self, QMoveEvent)

Reimplemented from QWidget.moveEvent().

### QSizeGrip.paintEvent (self, QPaintEvent)

Reimplemented from QWidget.paintEvent().

Paints the resize grip.

Resize grips are usually rendered as small diagonal textured lines in the lower-right corner. The paint event is passed in the event parameter.

### QSizeGrip.setVisible (self, bool)

Reimplemented from QWidget.setVisible().

### QSizeGrip.showEvent (self, QShowEvent)

Reimplemented from QWidget.showEvent().

### QSize QSizeGrip.sizeHint (self)

Reimplemented from QWidget.sizeHint().