QSizeGrip Class Reference

[ QtGui module]

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

继承 QWidget .

方法


详细描述

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.

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

QSizeGrip 类继承 QWidget 并重实现 mousePressEvent() and mouseMoveEvent() functions to feature the resize functionality, and the paintEvent() function to render the size grip widget.


方法文档编制

QSizeGrip.__init__ ( self , QWidget   parent )

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

构造作为子级 Widget 的重置尺寸角落为给定 parent .

bool QSizeGrip.event ( self , QEvent )

重实现自 QObject.event ().

bool QSizeGrip.eventFilter ( self , QObject , QEvent )

重实现自 QObject.eventFilter ().

QSizeGrip.hideEvent ( self , QHideEvent   hideEvent )

重实现自 QWidget.hideEvent ().

QSizeGrip.mouseMoveEvent ( self , QMouseEvent )

重实现自 QWidget.mouseMoveEvent ().

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

QSizeGrip.mousePressEvent ( self , QMouseEvent )

重实现自 QWidget.mousePressEvent ().

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

QSizeGrip.mouseReleaseEvent ( self , QMouseEvent   mouseEvent )

重实现自 QWidget.mouseReleaseEvent ().

QSizeGrip.moveEvent ( self , QMoveEvent   moveEvent )

重实现自 QWidget.moveEvent ().

QSizeGrip.paintEvent ( self , QPaintEvent )

重实现自 QWidget.paintEvent ().

描绘重置尺寸握把。

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

QSizeGrip.setVisible ( self , bool)

重实现自 QWidget.setVisible ().

QSizeGrip.showEvent ( self , QShowEvent   showEvent )

重实现自 QWidget.showEvent ().

QSize QSizeGrip.sizeHint ( self )

重实现自 QWidget.sizeHint ().

(bool, int  result ) QSizeGrip.winEvent ( self , MSG   m )

重实现自 QWidget.winEvent ().