- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | Friends

# QLayout Class Reference

Search for all occurrences

## Detailed Description

Definition at line 90 of file qlayout.h.

`#include <qlayout.h>`

Inheritance diagram for QLayout:
[legend]

List of all members.

## Public Types
enum | SizeConstraint { SetDefaultConstraint, SetNoConstraint, SetMinimumSize, SetFixedSize, SetMaximumSize, SetMinAndMaxSize }
## Public Member Functions
| QLayout (QWidget *parent)
| QLayout ()
| ~QLayout ()
int | margin () const
int | spacing () const
void | setMargin (int)
void | setSpacing (int)
void | setContentsMargins (int left, int top, int right, int bottom)
void | setContentsMargins (const QMargins &margins)
void | getContentsMargins (int *left, int *top, int *right, int *bottom) const
QMargins | contentsMargins () const
QRect | contentsRect () const
bool | setAlignment (QWidget *w, Qt::Alignment alignment)
bool | setAlignment (QLayout *l, Qt::Alignment alignment)
void | setSizeConstraint (SizeConstraint)
SizeConstraint | sizeConstraint () const
void | setMenuBar (QWidget *w)
QWidget * | menuBar () const
QWidget * | parentWidget () const
void | invalidate ()
QRect | geometry () const
bool | activate ()
void | update ()
void | addWidget (QWidget *w)
virtual void | addItem (QLayoutItem *)=0
void | removeWidget (QWidget *w)
void | removeItem (QLayoutItem *)
Qt::Orientations | expandingDirections () const
QSize | minimumSize () const
QSize | maximumSize () const
virtual void | setGeometry (const QRect &)
virtual QLayoutItem * | itemAt (int index) const =0
virtual QLayoutItem * | takeAt (int index)=0
virtual int | indexOf (QWidget *) const
virtual int | count () const =0
bool | isEmpty () const
int | totalHeightForWidth (int w) const
QSize | totalMinimumSize () const
QSize | totalMaximumSize () const
QSize | totalSizeHint () const
QLayout * | layout ()
void | setEnabled (bool)
bool | isEnabled () const
## Static Public Member Functions
static QSize | closestAcceptableSize (const QWidget *w, const QSize &s)
## Protected Member Functions
void | widgetEvent (QEvent *)
void | childEvent (QChildEvent *e)
void | addChildLayout (QLayout *l)
void | addChildWidget (QWidget *w)
QRect | alignmentRect (const QRect &) const
| QLayout (QLayoutPrivate &d, QLayout *, QWidget *)
## Properties
int | margin
int | spacing
SizeConstraint | sizeConstraint
## Friends
class | QApplicationPrivate
class | QWidget

## Member Enumeration Documentation

enum SizeConstraint

Search for all occurrences

Enumerator:

  SetDefaultConstraint | Search for all occurrences
  SetNoConstraint | Search for all occurrences
  SetMinimumSize | Search for all occurrences
  SetFixedSize | Search for all occurrences
  SetMaximumSize | Search for all occurrences
  SetMinAndMaxSize | Search for all occurrences

Definition at line 100 of file qlayout.h.

                            {
            SetDefaultConstraint,
            SetNoConstraint,
            SetMinimumSize,
            SetFixedSize,
            SetMaximumSize,
            SetMinAndMaxSize
    #if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN)
            , Auto = SetDefaultConstraint,
            FreeResize = SetNoConstraint,
            Minimum = SetMinimumSize,
            Fixed = SetFixedSize
    #endif
        };

## Constructor & Destructor Documentation

QLayout | ( | QWidget * | parent | ) |

QLayout | ( |  | ) |

~QLayout | ( |  | ) |

QLayout | ( | QLayoutPrivate & | d,
|  | QLayout * | ,
|  | QWidget * |
| ) |  | `[protected]`

## Member Function Documentation

int margin | ( |  | ) | const

Search for all occurrences

int spacing | ( |  | ) | const

Search for all occurrences

Reimplemented in QBoxLayout, QFormLayout, and QGridLayout.

void setMargin | ( | int |  | ) |

Search for all occurrences

void setSpacing | ( | int |  | ) |

Search for all occurrences

Reimplemented in QBoxLayout, QFormLayout, and QGridLayout.

void setContentsMargins | ( | int | left,
|  | int | top,
|  | int | right,
|  | int | bottom
| ) |  |

Search for all occurrences

Examples:
  MeshDisplace/displacer.cpp.

void setContentsMargins | ( | const QMargins & | margins | ) |

Search for all occurrences

void getContentsMargins | ( | int * | left,
|  | int * | top,
|  | int * | right,
|  | int * | bottom
| ) |  | const

Search for all occurrences

QMargins contentsMargins | ( |  | ) | const

Search for all occurrences

QRect contentsRect | ( |  | ) | const

Search for all occurrences

bool setAlignment | ( | QWidget * | w,
|  | Qt::Alignment | alignment
| ) |  |

Search for all occurrences

bool setAlignment | ( | QLayout * | l,
|  | Qt::Alignment | alignment
| ) |  |

Search for all occurrences

void setSizeConstraint | ( | SizeConstraint |  | ) |

Search for all occurrences

SizeConstraint sizeConstraint | ( |  | ) | const

Search for all occurrences

void setMenuBar | ( | QWidget * | w | ) |

Search for all occurrences

QWidget* menuBar | ( |  | ) | const

Search for all occurrences

QWidget* parentWidget | ( |  | ) | const

Search for all occurrences

void invalidate | ( |  | ) | `[virtual]`

Search for all occurrences

Reimplemented from QLayoutItem.

Reimplemented in QBoxLayout, QFormLayout, and QGridLayout.

QRect geometry | ( |  | ) | const `[virtual]`

Search for all occurrences

Implements QLayoutItem.

bool activate | ( |  | ) |

Search for all occurrences

void update | ( |  | ) |

Search for all occurrences

void addWidget | ( | QWidget * | w | ) |

Search for all occurrences

Reimplemented in QGridLayout, and QStackedLayout.

Examples:
  MeshDisplace/displacer.cpp.

virtual void addItem | ( | QLayoutItem * |  | ) | `[pure virtual]`

Search for all occurrences

Implemented in QBoxLayout, QFormLayout, QGridLayout, and QStackedLayout.

void removeWidget | ( | QWidget * | w | ) |

Search for all occurrences

void removeItem | ( | QLayoutItem * |  | ) |

Search for all occurrences

Qt::Orientations expandingDirections | ( |  | ) | const `[virtual]`

Search for all occurrences

Implements QLayoutItem.

Reimplemented in QBoxLayout, QFormLayout, and QGridLayout.

QSize minimumSize | ( |  | ) | const `[virtual]`

Search for all occurrences

Implements QLayoutItem.

Reimplemented in QBoxLayout, QFormLayout, QGridLayout, and QStackedLayout.

QSize maximumSize | ( |  | ) | const `[virtual]`

Search for all occurrences

Implements QLayoutItem.

Reimplemented in QBoxLayout, and QGridLayout.

virtual void setGeometry | ( | const QRect & |  | ) | `[virtual]`

Search for all occurrences

Implements QLayoutItem.

Reimplemented in QBoxLayout, QFormLayout, QGridLayout, and QStackedLayout.

virtual QLayoutItem* itemAt | ( | int | index | ) | const `[pure virtual]`

Search for all occurrences

Implemented in QBoxLayout, QFormLayout, QGridLayout, and QStackedLayout.

virtual QLayoutItem* takeAt | ( | int | index | ) | `[pure virtual]`

Search for all occurrences

Implemented in QBoxLayout, QFormLayout, QGridLayout, and QStackedLayout.

virtual int indexOf | ( | QWidget * |  | ) | const `[virtual]`

Search for all occurrences

virtual int count | ( |  | ) | const `[pure virtual]`

Search for all occurrences

Implemented in QBoxLayout, QFormLayout, QGridLayout, and QStackedLayout.

bool isEmpty | ( |  | ) | const `[virtual]`

Search for all occurrences

Implements QLayoutItem.

int totalHeightForWidth | ( | int | w | ) | const

Search for all occurrences

QSize totalMinimumSize | ( |  | ) | const

Search for all occurrences

QSize totalMaximumSize | ( |  | ) | const

Search for all occurrences

QSize totalSizeHint | ( |  | ) | const

Search for all occurrences

QLayout* layout | ( |  | ) | `[virtual]`

Search for all occurrences

Reimplemented from QLayoutItem.

void setEnabled | ( | bool |  | ) |

Search for all occurrences

bool isEnabled | ( |  | ) | const

Search for all occurrences

static QSize closestAcceptableSize | ( | const QWidget * | w,
|  | const QSize & | s
| ) |  | `[static]`

Search for all occurrences

void widgetEvent | ( | QEvent * |  | ) | `[protected]`

Search for all occurrences

void childEvent | ( | QChildEvent * | e | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QObject.

void addChildLayout | ( | QLayout * | l | ) | `[protected]`

Search for all occurrences

void addChildWidget | ( | QWidget * | w | ) | `[protected]`

Search for all occurrences

QRect alignmentRect | ( | const QRect & |  | ) | const `[protected]`

Search for all occurrences

## Friends And Related Function Documentation

friend class QApplicationPrivate `[friend]`

Search for all occurrences

Reimplemented from QObject.

Definition at line 205 of file qlayout.h.

friend class QWidget `[friend]`

Search for all occurrences

Reimplemented from QObject.

Definition at line 206 of file qlayout.h.

## Property Documentation

int margin `[read, write]`

Search for all occurrences

Definition at line 96 of file qlayout.h.

int spacing `[read, write]`

Search for all occurrences

Definition at line 97 of file qlayout.h.

SizeConstraint sizeConstraint `[read, write]`

Search for all occurrences

Definition at line 98 of file qlayout.h.

The documentation for this class was generated from the following file:

- QtGui/qlayout.h

QLayout QLayout QLayout QLayout QLayout QLayout QLayout QLayout QLayout QLayout
QLayout QLayout QLayout QLayout QLayout QLayout QLayout QLayout QLayout QLayout