QSizeGrip 類

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

頭: #include <QSizeGrip>
qmake: QT += widgets
繼承: QWidget

公共函數

QSizeGrip (QWidget * parent )
~QSizeGrip ()

重實現公共函數

virtual void setVisible (bool visible )
virtual QSize sizeHint () const

重實現保護函數

virtual bool event (QEvent * event )
virtual bool eventFilter (QObject * o , QEvent * e )
virtual void hideEvent (QHideEvent * hideEvent )
virtual void mouseMoveEvent (QMouseEvent * event )
virtual void mousePressEvent (QMouseEvent * event )
virtual void mouseReleaseEvent (QMouseEvent * mouseEvent )
virtual void moveEvent (QMoveEvent * moveEvent )
virtual void paintEvent (QPaintEvent * event )
virtual void showEvent (QShowEvent * showEvent )

額外繼承成員

詳細描述

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

此 Widget 工作像標準 Windows 重置尺寸手柄。在 X11 版本中,此重置尺寸手柄工作通常異於係統提供的,若 X11 窗口管理器不支持必要的現代後 ICCCM 規範。

把此 Widget 放在小部件樹的任何地方,用戶可以使用它重置頂層窗口 (或任何小部件) 大小采用 Qt::SubWindow 標誌設置。一般來說,它應位於右下角。

注意, QStatusBar 已使用此 Widget,因此若有狀態欄 (如,正在使用 QMainWindow ),則不需要明確使用此 Widget。同樣適用於 QDialog ,可以僅僅調用 QDialog::setSizeGripEnabled() .

在某些平颱,大小握把自動隱藏本身,當窗口全屏或最大化展示時。

Screenshot of a Fusion style size grip 大小握把 Widget 位於主窗口右下角,展示在 Fusion 小部件風格 .

The QSizeGrip 類繼承 QWidget 並重實現 mousePressEvent() and mouseMoveEvent() 函數以特徵重置尺寸功能,及 paintEvent() 函數去渲染大小握把 Widget。

另請參閱 QStatusBar and QWidget::windowState ().

成員函數文檔編製

QSizeGrip:: QSizeGrip ( QWidget * parent )

構造作為子級 Widget 的重置大小角落為給定 parent .

QSizeGrip:: ~QSizeGrip ()

銷毀此大小握把。

[virtual protected] bool QSizeGrip:: event ( QEvent * event )

重實現自 QObject::event ().

[virtual protected] bool QSizeGrip:: eventFilter ( QObject * o , QEvent * e )

重實現自 QObject::eventFilter ().

[virtual protected] void QSizeGrip:: hideEvent ( QHideEvent * hideEvent )

重實現自 QWidget::hideEvent ().

[virtual protected] void QSizeGrip:: mouseMoveEvent ( QMouseEvent * event )

重實現自 QWidget::mouseMoveEvent ().

重置包含此 Widget 的頂層小部件大小。鼠標移動事件被傳入 event 參數。

[virtual protected] void QSizeGrip:: mousePressEvent ( QMouseEvent * event )

重實現自 QWidget::mousePressEvent ().

接收用於 Widget 的鼠標按下事件,並首要重置大小操作。鼠標按下事件被傳入 event 參數。

[virtual protected] void QSizeGrip:: mouseReleaseEvent ( QMouseEvent * mouseEvent )

重實現自 QWidget::mouseReleaseEvent ().

[virtual protected] void QSizeGrip:: moveEvent ( QMoveEvent * moveEvent )

重實現自 QWidget::moveEvent ().

[virtual protected] void QSizeGrip:: paintEvent ( QPaintEvent * event )

重實現自 QWidget::paintEvent ().

描繪重置大小握把。

重置大小握把通常被渲染成位於右下角的小斜角紋理綫。描繪事件被傳入 event 參數。

[虛擬] void QSizeGrip:: setVisible ( bool visible )

重實現自 QWidget::setVisible ().

[virtual protected] void QSizeGrip:: showEvent ( QShowEvent * showEvent )

重實現自 QWidget::showEvent ().

[虛擬] QSize QSizeGrip:: sizeHint () const

重實現自 QWidget::sizeHint ().