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  · 

QSpacerItem Class

The QSpacerItem class provides blank space in a layout. More...

 #include <QSpacerItem>

Inherits: QLayoutItem.

Public Functions

QLayoutItem(Qt::Alignment alignment = 0)
QSpacerItem(int w, int h, QSizePolicy::Policy hPolicy = QSizePolicy::Minimum, QSizePolicy::Policy vPolicy = QSizePolicy::Minimum)
virtual ~QLayoutItem()
Qt::Alignment alignment() const
void changeSize(int w, int h, QSizePolicy::Policy hPolicy = QSizePolicy::Minimum, QSizePolicy::Policy vPolicy = QSizePolicy::Minimum)
virtual QSizePolicy::ControlTypes controlTypes() const
virtual Qt::Orientations expandingDirections() const = 0
virtual QRect geometry() const = 0
virtual bool hasHeightForWidth() const
virtual int heightForWidth(int w) const
virtual void invalidate()
virtual bool isEmpty() const = 0
virtual QLayout * layout()
virtual QSize maximumSize() const = 0
virtual int minimumHeightForWidth(int w) const
virtual QSize minimumSize() const = 0
void setAlignment(Qt::Alignment alignment)
virtual void setGeometry(const QRect & r) = 0
virtual QSize sizeHint() const = 0
virtual QSpacerItem * spacerItem()
virtual QWidget * widget()

Reimplemented Public Functions

virtual Qt::Orientations expandingDirections() const
virtual QRect geometry() const
virtual bool isEmpty() const
virtual QSize maximumSize() const
virtual QSize minimumSize() const
virtual void setGeometry(const QRect & r)
virtual QSize sizeHint() const
virtual QSpacerItem * spacerItem()

Detailed Description

The QSpacerItem class provides blank space in a layout.

Normally, you don't need to use this class directly. Qt's built-in layout managers provide the following functions for manipulating empty space in layouts:

ClassFunctions
QHBoxLayoutaddSpacing(), addStretch(), insertSpacing(), insertStretch()
QGridLayoutsetRowMinimumHeight(), setRowStretch(), setColumnMinimumWidth(), setColumnStretch()

See also QLayout, QWidgetItem, and QLayoutItem::spacerItem().

Member Function Documentation

QSpacerItem::QSpacerItem(int w, int h, QSizePolicy::Policy hPolicy = QSizePolicy::Minimum, QSizePolicy::Policy vPolicy = QSizePolicy::Minimum)

Constructs a spacer item with preferred width w, preferred height h, horizontal size policy hPolicy and vertical size policy vPolicy.

The default values provide a gap that is able to stretch if nothing else wants the space.

void QSpacerItem::changeSize(int w, int h, QSizePolicy::Policy hPolicy = QSizePolicy::Minimum, QSizePolicy::Policy vPolicy = QSizePolicy::Minimum)

Changes this spacer item to have preferred width w, preferred height h, horizontal size policy hPolicy and vertical size policy vPolicy.

The default values provide a gap that is able to stretch if nothing else wants the space.

Note that if changeSize() is called after the spacer item has been added to a layout, it is necessary to invalidate the layout in order for the spacer item's new size to take effect.

See also QSpacerItem::invalidate().

Qt::Orientations QSpacerItem::expandingDirections() const [virtual]

Reimplemented from QLayoutItem::expandingDirections().

QRect QSpacerItem::geometry() const [virtual]

Reimplemented from QLayoutItem::geometry().

See also setGeometry().

bool QSpacerItem::isEmpty() const [virtual]

Reimplemented from QLayoutItem::isEmpty().

Returns true.

QSize QSpacerItem::maximumSize() const [virtual]

Reimplemented from QLayoutItem::maximumSize().

QSize QSpacerItem::minimumSize() const [virtual]

Reimplemented from QLayoutItem::minimumSize().

void QSpacerItem::setGeometry(const QRect & r) [virtual]

Reimplemented from QLayoutItem::setGeometry().

See also geometry().

QSize QSpacerItem::sizeHint() const [virtual]

Reimplemented from QLayoutItem::sizeHint().

QSpacerItem * QSpacerItem::spacerItem() [virtual]

Reimplemented from QLayoutItem::spacerItem().

Returns a pointer to this object.

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