Qt:Документация 4.3.2/qlayout-qt3

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

[править] Qt 3 Support Members for QLayout

Описанные ниже члены класса являются частью слоя поддержки Qt 3. Они введены для поддержки старого кода в Qt 4. Мы советуем не использовать их во вновь создаваемом коде.



[править] Открытые функции

  • 8 открытых функций, унаследованных от QObject

[править] Защищенные функции

  • 1 protected function inherited from QObject

[править] Описание функций-членов

[править]
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().



Copyright © 2007 Trolltech Trademarks
Qt 4.3.2