返回介绍

QSizeGrip Class

发布于 2019-10-04 15:02:41 字数 2648 浏览 942 评论 0 收藏 0

The QSizeGrip class provides a corner-grip for resizing a top-level window. More...

#include <qsizegrip.h>

Inherits QWidget.

List of all member functions.

Public Members

  • QSizeGrip ( QWidget*parent, constchar*name = 0 )
  • ~QSizeGrip ()
  • virtual QSize sizeHint () const

Protected Members

  • virtual void paintEvent ( QPaintEvent*e )
  • virtual void mousePressEvent ( QMouseEvent*e )
  • virtual void mouseMoveEvent ( QMouseEvent*e )

Detailed Description

The QSizeGrip class provides a corner-grip for resizing a top-level window.

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; we hope to reduce this difference in the future.

Put this widget anywhere in a widget tree and the user can use it to resize the top-level window. 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.

See also QStatusBar, Widget Appearance and Style, Main Window and Related Classes and Basic Widgets.


Member Function Documentation

QSizeGrip::QSizeGrip ( QWidget*parent, constchar*name = 0 )

Constructs a resize corner called name, as a child widget of parent.

QSizeGrip::~QSizeGrip ()

Destroys the size grip.

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

Resizes the top-level widget containing this widget. The event is in e.

Reimplemented from QWidget.

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

Primes the resize operation. The event is in e.

Reimplemented from QWidget.

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

Paints the resize grip. Resize grips are usually rendered as small diagonal textured lines in the lower-right corner. The event is in e.

Reimplemented from QWidget.

QSize QSizeGrip::sizeHint () const [virtual]

Returns the size grip's size hint; this is a small size.

Reimplemented from QWidget.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文