Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QSizeGrip Class

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

 #include <QSizeGrip>

Inherits: QWidget.

Public Types

enum PaintDeviceMetric { PdmWidth, PdmHeight, PdmWidthMM, PdmHeightMM, ..., PdmPhysicalDpiY }

Public Functions

QSizeGrip(QWidget * parent)
virtual ~QPaintDevice()
~QSizeGrip()
int colorCount() const
int depth() const
int height() const
int heightMM() const
int logicalDpiX() const
int logicalDpiY() const
virtual QPaintEngine * paintEngine() const = 0
bool paintingActive() const
int physicalDpiX() const
int physicalDpiY() const
int width() const
int widthMM() const

Reimplemented Public Functions

virtual void setVisible(bool visible)
virtual QSize sizeHint() const
  • 215 public functions inherited from QWidget
  • 31 public functions inherited from QObject

Protected Functions

QPaintDevice()
virtual void init(QPainter * painter) const
virtual int metric(PaintDeviceMetric metric) const
virtual QPaintDevice * redirected(QPoint * offset) const
virtual QPainter * sharedPainter() const

Reimplemented Protected Functions

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)
  • 37 protected functions inherited from QWidget
  • 9 protected functions inherited from QObject

Additional Inherited Members

  • 58 properties inherited from QWidget
  • 1 property inherited from QObject
  • 19 public slots inherited from QWidget
  • 1 public slot inherited from QObject
  • 1 signal inherited from QWidget
  • 2 signal inherited from QObject
  • 4 static public members inherited from QWidget
  • 11 static public members inherited from QObject
  • 1 protected slot inherited from QWidget

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.

Screenshot of a Plastique style size gripA 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().

Member Function Documentation

QSizeGrip::QSizeGrip(QWidget * parent)

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

QSizeGrip::~QSizeGrip()

Destroys this size grip.

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

Reimplemented from QObject::event().

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

Reimplemented from QObject::eventFilter().

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

Reimplemented from QWidget::hideEvent().

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

Reimplemented from QWidget::mouseMoveEvent().

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

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

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.

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

Reimplemented from QWidget::mouseReleaseEvent().

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

Reimplemented from QWidget::moveEvent().

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

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.

void QSizeGrip::setVisible(bool visible) [virtual]

Reimplemented from QWidget::setVisible().

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

Reimplemented from QWidget::showEvent().

QSize QSizeGrip::sizeHint() const [virtual]

Reimplemented from QWidget::sizeHint().

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web