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  · 

Qt 3 Support Members for QLayout

The following class members are part of the Qt 3 support layer. They are provided to help you port old code to Qt 4. We advise against using them in new code.

Public Functions

  • 8 public functions inherited from QObject

Protected Functions

  • 1 protected function inherited from QObject

Member Function Documentation

QLayout::QLayout ( QWidget * parent, int margin, int spacing = -1, const char * name = 0 )

Constructs a new top-level QLayout called name, with parent widget parent. parent may not be 0.

The margin is the number of pixels between the edge of the widget and the managed children. The spacing sets the value of spacing(), which gives the spacing between the managed widgets. If spacing is -1 (the default), spacing is set to the value of margin.

There can be only one top-level layout for a widget. It is returned by QWidget::layout()

See also QWidget::setLayout().

QLayout::QLayout ( QLayout * parentLayout, int spacing = -1, const char * name = 0 )

Constructs a new child QLayout called name, and places it inside parentLayout by using the default placement defined by addItem().

If spacing is -1, this QLayout inherits parentLayout's spacing(), otherwise the value of spacing is used.

QLayout::QLayout ( int spacing, const char * name = 0 )

Constructs a new child QLayout called name. If spacing is -1, this QLayout inherits its parent's spacing(); otherwise the value of spacing is used.

This layout has to be inserted into another layout before geometry management will work.

void QLayout::add ( QWidget * widget )

Use addWidget(widget) instead.

bool QLayout::autoAdd () const

Automatically adding widgets is deprecated. Use addWidget() or addLayout() instead.

See also setAutoAdd().

int QLayout::defaultBorder () const

Use spacing() instead.

void QLayout::deleteAllItems ()   [protected]

Removes and deletes all items in this layout.

void QLayout::freeze ( int w = 0, int h = 0 )

Sets this layout's parent widget to a fixed size with width w and height h, stopping the user from resizing it, and also prevents the layout from resizing it, even if the layout's size hint should change. Does nothing if this is not a top-level layout (i.e., if parent()->isWidgetType()).

As a special case, if both w and h are 0, then the layout's current sizeHint() is used.

Use setResizeMode(Fixed) to stop the widget from being resized by the user, while still allowing the layout to resize it when the sizeHint() changes.

Use setResizeMode(FreeResize) to allow the user to resize the widget, while preventing the layout from resizing it.

bool QLayout::isTopLevel () const

Returns true if this layout is a top-level layout, i.e. not a child of another layout; otherwise returns false.

QLayoutIterator QLayout::iterator ()

Use a QLayoutIterator() constructor instead.

QWidget * QLayout::mainWidget () const

Use parentWidget() instead.

void QLayout::remove ( QWidget * widget )

Use removeWidget(widget) instead.

SizeConstraint QLayout::resizeMode () const

Use sizeConstraint() instead.

See also setResizeMode().

void QLayout::setAutoAdd ( bool a )

Automatically adding widgets is deprecated. Use addWidget() or addLayout() instead.

See also autoAdd().

void QLayout::setResizeMode ( SizeConstraint constraint )

Use setSizeConstraint(constraint) instead.

See also resizeMode().

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 64
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. La rubrique Qt a besoin de vous ! 1
Page suivante

Le Qt Developer Network au hasard

Logo

Comment fermer une application

Le Qt Developer Network est un réseau de développeurs Qt anglophone, où ils peuvent partager leur expérience sur le framework. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

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 4.2
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