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  · 

QGraphicsAnchor Class

The QGraphicsAnchor class represents an anchor between two items in a QGraphicsAnchorLayout. More...

 #include <QGraphicsAnchor>

Inherits: QObject.

This class was introduced in Qt 4.6.

Properties

  • 1 property inherited from QObject

Public Functions

~QGraphicsAnchor()
void setSizePolicy(QSizePolicy::Policy policy)
void setSpacing(qreal spacing)
QSizePolicy::Policy sizePolicy() const
qreal spacing() const
void unsetSpacing()
  • 31 public functions inherited from QObject

Additional Inherited Members

  • 1 public slot inherited from QObject
  • 2 signal inherited from QObject
  • 11 static public members inherited from QObject
  • 9 protected functions inherited from QObject

Detailed Description

The QGraphicsAnchor class represents an anchor between two items in a QGraphicsAnchorLayout.

The graphics anchor provides an API that enables you to query and manipulate the properties an anchor has. When an anchor is added to the layout with QGraphicsAnchorLayout::addAnchor(), a QGraphicsAnchor instance is returned where the properties are initialized to their default values. The properties can then be further changed, and they will be picked up the next time the layout is activated.

See also QGraphicsAnchorLayout::anchor().

Property Documentation

sizePolicy : QSizePolicy::Policy

This property holds the size policy for the QGraphicsAnchor.

By setting the size policy on an anchor you can configure how the anchor can resize itself from its preferred spacing. For instance, if the anchor has the size policy QSizePolicy::Minimum, the spacing is the minimum size of the anchor. However, its size can grow up to the anchors maximum size. If the default size policy is QSizePolicy::Fixed, the anchor can neither grow or shrink, which means that the only size the anchor can have is the spacing. QSizePolicy::Fixed is the default size policy. QGraphicsAnchor always has a minimum spacing of 0 and a very large maximum spacing.

Access functions:

QSizePolicy::Policy sizePolicy() const
void setSizePolicy(QSizePolicy::Policy policy)

See also QGraphicsAnchor::spacing.

spacing : qreal

This property holds the preferred space between items in the QGraphicsAnchorLayout.

Depending on the anchor type, the default spacing is either 0 or a value returned from the style.

Access functions:

qreal spacing() const
void setSpacing(qreal spacing)
void unsetSpacing()

See also QGraphicsAnchorLayout::addAnchor().

Member Function Documentation

QGraphicsAnchor::~QGraphicsAnchor()

Removes the QGraphicsAnchor object from the layout and destroys it.

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