
We bake cookies in your browser for a better experience. Using this site means that you consent.Read More
TheQSizeGrip class provides a resize handle for resizing top-level windows.More...
| Header: | #include <QSizeGrip> |
| Inherits: | 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) |
| virtual bool | winEvent(MSG * m, long * result) |
TheQSizeGrip 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 theQt::SubWindow flag set. Generally, this should be in the lower right-hand corner. Note thatQStatusBar 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.
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 thePlastique widget style. |
TheQSizeGrip class inheritsQWidget and reimplements themousePressEvent() andmouseMoveEvent() functions to feature the resize functionality, and thepaintEvent() function to render the size grip widget.
See alsoQStatusBar andQWidget::windowState().
Constructs a resize corner as a child widget of the givenparent.
Destroys this size grip.
[virtual protected]bool QSizeGrip::event(QEvent * event)Reimplemented fromQObject::event().
[virtual protected]bool QSizeGrip::eventFilter(QObject * o,QEvent * e)Reimplemented fromQObject::eventFilter().
[virtual protected]void QSizeGrip::hideEvent(QHideEvent * hideEvent)Reimplemented fromQWidget::hideEvent().
[virtual protected]void QSizeGrip::mouseMoveEvent(QMouseEvent * event)Reimplemented fromQWidget::mouseMoveEvent().
Resizes the top-level widget containing this widget. The mouse move event is passed in theevent parameter.
[virtual protected]void QSizeGrip::mousePressEvent(QMouseEvent * event)Reimplemented fromQWidget::mousePressEvent().
Receives the mouse press events for the widget, and primes the resize operation. The mouse press event is passed in theevent parameter.
[virtual protected]void QSizeGrip::mouseReleaseEvent(QMouseEvent * mouseEvent)Reimplemented fromQWidget::mouseReleaseEvent().
[virtual protected]void QSizeGrip::moveEvent(QMoveEvent * moveEvent)Reimplemented fromQWidget::moveEvent().
[virtual protected]void QSizeGrip::paintEvent(QPaintEvent * event)Reimplemented fromQWidget::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 theevent parameter.
[virtual]void QSizeGrip::setVisible(bool visible)Reimplemented fromQWidget::setVisible().
[virtual protected]void QSizeGrip::showEvent(QShowEvent * showEvent)Reimplemented fromQWidget::showEvent().
[virtual]QSize QSizeGrip::sizeHint() constReimplemented fromQWidget::sizeHint().
[virtual protected]bool QSizeGrip::winEvent(MSG * m,long * result)Reimplemented fromQWidget::winEvent().
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.