[][src]Struct qt_widgets::QGridLayout

#[repr(C)]
pub struct QGridLayout { /* fields omitted */ }

The QGridLayout class lays out widgets in a grid.

C++ class: QGridLayout.

C++ documentation:

The QGridLayout class lays out widgets in a grid.

QGridLayout takes the space made available to it (by its parent layout or by the parentWidget()), divides it up into rows and columns, and puts each widget it manages into the correct cell.

Columns and rows behave identically; we will discuss columns, but there are equivalent functions for rows.

Each column has a minimum width and a stretch factor. The minimum width is the greatest of that set using setColumnMinimumWidth() and the minimum width of each widget in that column. The stretch factor is set using setColumnStretch() and determines how much of the available space the column will get over and above its necessary minimum.

Normally, each managed widget or layout is put into a cell of its own using addWidget(). It is also possible for a widget to occupy multiple cells using the row and column spanning overloads of addItem() and addWidget(). If you do this, QGridLayout will guess how to distribute the size over the columns/rows (based on the stretch factors).

To remove a widget from a layout, call removeWidget(). Calling QWidget::hide() on a widget also effectively removes the widget from the layout until QWidget::show() is called.

This illustration shows a fragment of a dialog with a five-column, three-row grid (the grid is shown overlaid in magenta):

A grid layout

Columns 0, 2 and 4 in this dialog fragment are made up of a QLabel, a QLineEdit, and a QListBox. Columns 1 and 3 are placeholders made with setColumnMinimumWidth(). Row 0 consists of three QLabel objects, row 1 of three QLineEdit objects and row 2 of three QListBox objects. We used placeholder columns (1 and 3) to get the right amount of space between the columns.

Note that the columns and rows are not equally wide or tall. If you want two columns to have the same width, you must set their minimum widths and stretch factors to be the same yourself. You do this using setColumnMinimumWidth() and setColumnStretch().

If the QGridLayout is not the top-level layout (i.e. does not manage all of the widget's area and children), you must add it to its parent layout when you create it, but before you do anything with it. The normal way to add a layout is by calling addLayout() on the parent layout.

Once you have added your layout you can start putting widgets and other layouts into the cells of your grid layout using addWidget(), addItem(), and addLayout().

QGridLayout also includes two margin widths: the contents margin and the spacing(). The contents margin is the width of the reserved space along each of the QGridLayout's four sides. The spacing() is the width of the automatically allocated spacing between neighboring boxes.

The default contents margin values are provided by the style. The default value Qt styles specify is 9 for child widgets and 11 for windows. The spacing defaults to the same as the margin width for a top-level layout, or to the same as the parent layout.

Methods

impl QGridLayout[src]

pub unsafe fn add_item_6a(
    &mut self,
    item: impl CastInto<MutPtr<QLayoutItem>>,
    row: c_int,
    column: c_int,
    row_span: c_int,
    column_span: c_int,
    arg6: QFlags<AlignmentFlag>
)
[src]

Adds item at position row, column, spanning rowSpan rows and columnSpan columns, and aligns it according to alignment. If rowSpan and/or columnSpan is -1, then the item will extend to the bottom and/or right edge, respectively. The layout takes ownership of the item.

Calls C++ function: void QGridLayout::addItem(QLayoutItem* item, int row, int column, int rowSpan = …, int columnSpan = …, QFlags<Qt::AlignmentFlag> arg6 = …).

C++ documentation:

Adds item at position row, column, spanning rowSpan rows and columnSpan columns, and aligns it according to alignment. If rowSpan and/or columnSpan is -1, then the item will extend to the bottom and/or right edge, respectively. The layout takes ownership of the item.

Warning: Do not use this function to add child layouts or child widget items. Use addLayout() or addWidget() instead.

pub unsafe fn add_item_5a(
    &mut self,
    item: impl CastInto<MutPtr<QLayoutItem>>,
    row: c_int,
    column: c_int,
    row_span: c_int,
    column_span: c_int
)
[src]

Adds item at position row, column, spanning rowSpan rows and columnSpan columns, and aligns it according to alignment. If rowSpan and/or columnSpan is -1, then the item will extend to the bottom and/or right edge, respectively. The layout takes ownership of the item.

Calls C++ function: void QGridLayout::addItem(QLayoutItem* item, int row, int column, int rowSpan = …, int columnSpan = …).

C++ documentation:

Adds item at position row, column, spanning rowSpan rows and columnSpan columns, and aligns it according to alignment. If rowSpan and/or columnSpan is -1, then the item will extend to the bottom and/or right edge, respectively. The layout takes ownership of the item.

Warning: Do not use this function to add child layouts or child widget items. Use addLayout() or addWidget() instead.

pub unsafe fn add_item_4a(
    &mut self,
    item: impl CastInto<MutPtr<QLayoutItem>>,
    row: c_int,
    column: c_int,
    row_span: c_int
)
[src]

Adds item at position row, column, spanning rowSpan rows and columnSpan columns, and aligns it according to alignment. If rowSpan and/or columnSpan is -1, then the item will extend to the bottom and/or right edge, respectively. The layout takes ownership of the item.

Calls C++ function: void QGridLayout::addItem(QLayoutItem* item, int row, int column, int rowSpan = …).

C++ documentation:

Adds item at position row, column, spanning rowSpan rows and columnSpan columns, and aligns it according to alignment. If rowSpan and/or columnSpan is -1, then the item will extend to the bottom and/or right edge, respectively. The layout takes ownership of the item.

Warning: Do not use this function to add child layouts or child widget items. Use addLayout() or addWidget() instead.

pub unsafe fn add_item_3a(
    &mut self,
    item: impl CastInto<MutPtr<QLayoutItem>>,
    row: c_int,
    column: c_int
)
[src]

Adds item at position row, column, spanning rowSpan rows and columnSpan columns, and aligns it according to alignment. If rowSpan and/or columnSpan is -1, then the item will extend to the bottom and/or right edge, respectively. The layout takes ownership of the item.

Calls C++ function: void QGridLayout::addItem(QLayoutItem* item, int row, int column).

C++ documentation:

Adds item at position row, column, spanning rowSpan rows and columnSpan columns, and aligns it according to alignment. If rowSpan and/or columnSpan is -1, then the item will extend to the bottom and/or right edge, respectively. The layout takes ownership of the item.

Warning: Do not use this function to add child layouts or child widget items. Use addLayout() or addWidget() instead.

pub unsafe fn add_layout_4a(
    &mut self,
    arg1: impl CastInto<MutPtr<QLayout>>,
    row: c_int,
    column: c_int,
    arg4: QFlags<AlignmentFlag>
)
[src]

Places the layout at position (row, column) in the grid. The top-left position is (0, 0).

Calls C++ function: void QGridLayout::addLayout(QLayout* arg1, int row, int column, QFlags<Qt::AlignmentFlag> arg4 = …).

C++ documentation:

Places the layout at position (row, column) in the grid. The top-left position is (0, 0).

The alignment is specified by alignment. The default alignment is 0, which means that the widget fills the entire cell.

A non-zero alignment indicates that the layout should not grow to fill the available space but should be sized according to sizeHint().

layout becomes a child of the grid layout.

pub unsafe fn add_layout_6a(
    &mut self,
    arg1: impl CastInto<MutPtr<QLayout>>,
    row: c_int,
    column: c_int,
    row_span: c_int,
    column_span: c_int,
    arg6: QFlags<AlignmentFlag>
)
[src]

This is an overloaded function.

Calls C++ function: void QGridLayout::addLayout(QLayout* arg1, int row, int column, int rowSpan, int columnSpan, QFlags<Qt::AlignmentFlag> arg6 = …).

C++ documentation:

This is an overloaded function.

This version adds the layout layout to the cell grid, spanning multiple rows/columns. The cell will start at row, column spanning rowSpan rows and columnSpan columns.

If rowSpan and/or columnSpan is -1, then the layout will extend to the bottom and/or right edge, respectively.

pub unsafe fn add_layout_3a(
    &mut self,
    arg1: impl CastInto<MutPtr<QLayout>>,
    row: c_int,
    column: c_int
)
[src]

Places the layout at position (row, column) in the grid. The top-left position is (0, 0).

Calls C++ function: void QGridLayout::addLayout(QLayout* arg1, int row, int column).

C++ documentation:

Places the layout at position (row, column) in the grid. The top-left position is (0, 0).

The alignment is specified by alignment. The default alignment is 0, which means that the widget fills the entire cell.

A non-zero alignment indicates that the layout should not grow to fill the available space but should be sized according to sizeHint().

layout becomes a child of the grid layout.

pub unsafe fn add_layout_5a(
    &mut self,
    arg1: impl CastInto<MutPtr<QLayout>>,
    row: c_int,
    column: c_int,
    row_span: c_int,
    column_span: c_int
)
[src]

This is an overloaded function.

Calls C++ function: void QGridLayout::addLayout(QLayout* arg1, int row, int column, int rowSpan, int columnSpan).

C++ documentation:

This is an overloaded function.

This version adds the layout layout to the cell grid, spanning multiple rows/columns. The cell will start at row, column spanning rowSpan rows and columnSpan columns.

If rowSpan and/or columnSpan is -1, then the layout will extend to the bottom and/or right edge, respectively.

pub unsafe fn add_widget_1a(&mut self, w: impl CastInto<MutPtr<QWidget>>)[src]

Calls C++ function: void QGridLayout::addWidget(QWidget* w).

pub unsafe fn add_widget_4a(
    &mut self,
    arg1: impl CastInto<MutPtr<QWidget>>,
    row: c_int,
    column: c_int,
    arg4: QFlags<AlignmentFlag>
)
[src]

Adds the given widget to the cell grid at row, column. The top-left position is (0, 0) by default.

Calls C++ function: void QGridLayout::addWidget(QWidget* arg1, int row, int column, QFlags<Qt::AlignmentFlag> arg4 = …).

C++ documentation:

Adds the given widget to the cell grid at row, column. The top-left position is (0, 0) by default.

The alignment is specified by alignment. The default alignment is 0, which means that the widget fills the entire cell.

pub unsafe fn add_widget_6a(
    &mut self,
    arg1: impl CastInto<MutPtr<QWidget>>,
    row: c_int,
    column: c_int,
    row_span: c_int,
    column_span: c_int,
    arg6: QFlags<AlignmentFlag>
)
[src]

This is an overloaded function.

Calls C++ function: void QGridLayout::addWidget(QWidget* arg1, int row, int column, int rowSpan, int columnSpan, QFlags<Qt::AlignmentFlag> arg6 = …).

C++ documentation:

This is an overloaded function.

This version adds the given widget to the cell grid, spanning multiple rows/columns. The cell will start at fromRow, fromColumn spanning rowSpan rows and columnSpan columns. The widget will have the given alignment.

If rowSpan and/or columnSpan is -1, then the widget will extend to the bottom and/or right edge, respectively.

pub unsafe fn add_widget_3a(
    &mut self,
    arg1: impl CastInto<MutPtr<QWidget>>,
    row: c_int,
    column: c_int
)
[src]

Adds the given widget to the cell grid at row, column. The top-left position is (0, 0) by default.

Calls C++ function: void QGridLayout::addWidget(QWidget* arg1, int row, int column).

C++ documentation:

Adds the given widget to the cell grid at row, column. The top-left position is (0, 0) by default.

The alignment is specified by alignment. The default alignment is 0, which means that the widget fills the entire cell.

pub unsafe fn add_widget_5a(
    &mut self,
    arg1: impl CastInto<MutPtr<QWidget>>,
    row: c_int,
    column: c_int,
    row_span: c_int,
    column_span: c_int
)
[src]

This is an overloaded function.

Calls C++ function: void QGridLayout::addWidget(QWidget* arg1, int row, int column, int rowSpan, int columnSpan).

C++ documentation:

This is an overloaded function.

This version adds the given widget to the cell grid, spanning multiple rows/columns. The cell will start at fromRow, fromColumn spanning rowSpan rows and columnSpan columns. The widget will have the given alignment.

If rowSpan and/or columnSpan is -1, then the widget will extend to the bottom and/or right edge, respectively.

pub unsafe fn cell_rect(&self, row: c_int, column: c_int) -> CppBox<QRect>[src]

Returns the geometry of the cell with row row and column column in the grid. Returns an invalid rectangle if row or column is outside the grid.

Calls C++ function: QRect QGridLayout::cellRect(int row, int column) const.

C++ documentation:

Returns the geometry of the cell with row row and column column in the grid. Returns an invalid rectangle if row or column is outside the grid.

Warning: in the current version of Qt this function does not return valid results until setGeometry() has been called, i.e. after the parentWidget() is visible.

pub unsafe fn column_count(&self) -> c_int[src]

Returns the number of columns in this grid.

Calls C++ function: int QGridLayout::columnCount() const.

C++ documentation:

Returns the number of columns in this grid.

pub unsafe fn column_minimum_width(&self, column: c_int) -> c_int[src]

Returns the column spacing for column column.

Calls C++ function: int QGridLayout::columnMinimumWidth(int column) const.

C++ documentation:

Returns the column spacing for column column.

See also setColumnMinimumWidth().

pub unsafe fn column_stretch(&self, column: c_int) -> c_int[src]

Returns the stretch factor for column column.

Calls C++ function: int QGridLayout::columnStretch(int column) const.

C++ documentation:

Returns the stretch factor for column column.

See also setColumnStretch().

pub unsafe fn count(&self) -> c_int[src]

Reimplemented from QLayout::count().

Calls C++ function: virtual int QGridLayout::count() const.

C++ documentation:

Reimplemented from QLayout::count().

pub unsafe fn expanding_directions(&self) -> QFlags<Orientation>[src]

Reimplemented from QLayoutItem::expandingDirections().

Calls C++ function: virtual QFlags<Qt::Orientation> QGridLayout::expandingDirections() const.

C++ documentation:

Reimplemented from QLayoutItem::expandingDirections().

pub unsafe fn get_item_position(
    &self,
    idx: c_int,
    row: impl CastInto<MutPtr<c_int>>,
    column: impl CastInto<MutPtr<c_int>>,
    row_span: impl CastInto<MutPtr<c_int>>,
    column_span: impl CastInto<MutPtr<c_int>>
)
[src]

Returns the position information of the item with the given index.

Calls C++ function: void QGridLayout::getItemPosition(int idx, int* row, int* column, int* rowSpan, int* columnSpan) const.

C++ documentation:

Returns the position information of the item with the given index.

The variables passed as row and column are updated with the position of the item in the layout, and the rowSpan and columnSpan variables are updated with the vertical and horizontal spans of the item.

See also itemAtPosition() and itemAt().

pub unsafe fn has_height_for_width(&self) -> bool[src]

Reimplemented from QLayoutItem::hasHeightForWidth().

Calls C++ function: virtual bool QGridLayout::hasHeightForWidth() const.

C++ documentation:

Reimplemented from QLayoutItem::hasHeightForWidth().

pub unsafe fn height_for_width(&self, arg1: c_int) -> c_int[src]

Reimplemented from QLayoutItem::heightForWidth().

Calls C++ function: virtual int QGridLayout::heightForWidth(int arg1) const.

C++ documentation:

Reimplemented from QLayoutItem::heightForWidth().

pub unsafe fn horizontal_spacing(&self) -> c_int[src]

This property holds the spacing between widgets that are laid out side by side

Calls C++ function: int QGridLayout::horizontalSpacing() const.

C++ documentation:

This property holds the spacing between widgets that are laid out side by side

If no value is explicitly set, the layout's horizontal spacing is inherited from the parent layout, or from the style settings for the parent widget.

This property was introduced in Qt 4.3.

Access functions:

int horizontalSpacing() const
void setHorizontalSpacing(int spacing)

See also verticalSpacing, QStyle::pixelMetric(), and PM_LayoutHorizontalSpacing.

pub unsafe fn invalidate(&mut self)[src]

Reimplemented from QLayoutItem::invalidate().

Calls C++ function: virtual void QGridLayout::invalidate().

C++ documentation:

Reimplemented from QLayoutItem::invalidate().

pub unsafe fn item_at(&self, index: c_int) -> MutPtr<QLayoutItem>[src]

Reimplemented from QLayout::itemAt().

Calls C++ function: virtual QLayoutItem* QGridLayout::itemAt(int index) const.

C++ documentation:

Reimplemented from QLayout::itemAt().

pub unsafe fn item_at_position(
    &self,
    row: c_int,
    column: c_int
) -> MutPtr<QLayoutItem>
[src]

Returns the layout item that occupies cell (row, column), or 0 if the cell is empty.

Calls C++ function: QLayoutItem* QGridLayout::itemAtPosition(int row, int column) const.

C++ documentation:

Returns the layout item that occupies cell (row, column), or 0 if the cell is empty.

This function was introduced in Qt 4.4.

See also getItemPosition() and indexOf().

pub unsafe fn maximum_size(&self) -> CppBox<QSize>[src]

Reimplemented from QLayoutItem::maximumSize().

Calls C++ function: virtual QSize QGridLayout::maximumSize() const.

C++ documentation:

Reimplemented from QLayoutItem::maximumSize().

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QGridLayout::metaObject() const.

pub unsafe fn minimum_height_for_width(&self, arg1: c_int) -> c_int[src]

Reimplemented from QLayoutItem::minimumHeightForWidth().

Calls C++ function: virtual int QGridLayout::minimumHeightForWidth(int arg1) const.

C++ documentation:

Reimplemented from QLayoutItem::minimumHeightForWidth().

pub unsafe fn minimum_size(&self) -> CppBox<QSize>[src]

Reimplemented from QLayoutItem::minimumSize().

Calls C++ function: virtual QSize QGridLayout::minimumSize() const.

C++ documentation:

Reimplemented from QLayoutItem::minimumSize().

pub unsafe fn new_1a(
    parent: impl CastInto<MutPtr<QWidget>>
) -> CppBox<QGridLayout>
[src]

Constructs a new QGridLayout with parent widget, parent. The layout has one row and one column initially, and will expand when new items are inserted.

Calls C++ function: [constructor] void QGridLayout::QGridLayout(QWidget* parent).

C++ documentation:

Constructs a new QGridLayout with parent widget, parent. The layout has one row and one column initially, and will expand when new items are inserted.

pub unsafe fn new_0a() -> CppBox<QGridLayout>[src]

Constructs a new grid layout.

Calls C++ function: [constructor] void QGridLayout::QGridLayout().

C++ documentation:

Constructs a new grid layout.

You must insert this grid into another layout. You can insert widgets and layouts into this layout at any time, but laying out will not be performed before this is inserted into another layout.

pub unsafe fn origin_corner(&self) -> Corner[src]

Returns the corner that's used for the grid's origin, i.e. for position (0, 0).

Calls C++ function: Qt::Corner QGridLayout::originCorner() const.

C++ documentation:

Returns the corner that's used for the grid's origin, i.e. for position (0, 0).

See also setOriginCorner().

pub unsafe fn qt_metacall(
    &mut self,
    arg1: Call,
    arg2: c_int,
    arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]

Calls C++ function: virtual int QGridLayout::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(
    &mut self,
    arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]

Calls C++ function: virtual void* QGridLayout::qt_metacast(const char* arg1).

pub unsafe fn row_count(&self) -> c_int[src]

Returns the number of rows in this grid.

Calls C++ function: int QGridLayout::rowCount() const.

C++ documentation:

Returns the number of rows in this grid.

pub unsafe fn row_minimum_height(&self, row: c_int) -> c_int[src]

Returns the minimum width set for row row.

Calls C++ function: int QGridLayout::rowMinimumHeight(int row) const.

C++ documentation:

Returns the minimum width set for row row.

See also setRowMinimumHeight().

pub unsafe fn row_stretch(&self, row: c_int) -> c_int[src]

Returns the stretch factor for row row.

Calls C++ function: int QGridLayout::rowStretch(int row) const.

C++ documentation:

Returns the stretch factor for row row.

See also setRowStretch().

pub unsafe fn set_column_minimum_width(
    &mut self,
    column: c_int,
    min_size: c_int
)
[src]

Sets the minimum width of column column to minSize pixels.

Calls C++ function: void QGridLayout::setColumnMinimumWidth(int column, int minSize).

C++ documentation:

Sets the minimum width of column column to minSize pixels.

See also columnMinimumWidth() and setRowMinimumHeight().

pub unsafe fn set_column_stretch(&mut self, column: c_int, stretch: c_int)[src]

Sets the stretch factor of column column to stretch. The first column is number 0.

Calls C++ function: void QGridLayout::setColumnStretch(int column, int stretch).

C++ documentation:

Sets the stretch factor of column column to stretch. The first column is number 0.

The stretch factor is relative to the other columns in this grid. Columns with a higher stretch factor take more of the available space.

The default stretch factor is 0. If the stretch factor is 0 and no other column in this table can grow at all, the column may still grow.

An alternative approach is to add spacing using addItem() with a QSpacerItem.

See also columnStretch() and setRowStretch().

pub unsafe fn set_default_positioning(&mut self, n: c_int, orient: Orientation)[src]

Calls C++ function: void QGridLayout::setDefaultPositioning(int n, Qt::Orientation orient).

pub unsafe fn set_geometry(&mut self, arg1: impl CastInto<Ref<QRect>>)[src]

Reimplemented from QLayoutItem::setGeometry().

Calls C++ function: virtual void QGridLayout::setGeometry(const QRect& arg1).

C++ documentation:

Reimplemented from QLayoutItem::setGeometry().

pub unsafe fn set_horizontal_spacing(&mut self, spacing: c_int)[src]

This property holds the spacing between widgets that are laid out side by side

Calls C++ function: void QGridLayout::setHorizontalSpacing(int spacing).

C++ documentation:

This property holds the spacing between widgets that are laid out side by side

If no value is explicitly set, the layout's horizontal spacing is inherited from the parent layout, or from the style settings for the parent widget.

This property was introduced in Qt 4.3.

Access functions:

int horizontalSpacing() const
void setHorizontalSpacing(int spacing)

See also verticalSpacing, QStyle::pixelMetric(), and PM_LayoutHorizontalSpacing.

pub unsafe fn set_origin_corner(&mut self, arg1: Corner)[src]

Sets the grid's origin corner, i.e. position (0, 0), to corner.

Calls C++ function: void QGridLayout::setOriginCorner(Qt::Corner arg1).

C++ documentation:

Sets the grid's origin corner, i.e. position (0, 0), to corner.

See also originCorner().

pub unsafe fn set_row_minimum_height(&mut self, row: c_int, min_size: c_int)[src]

Sets the minimum height of row row to minSize pixels.

Calls C++ function: void QGridLayout::setRowMinimumHeight(int row, int minSize).

C++ documentation:

Sets the minimum height of row row to minSize pixels.

See also rowMinimumHeight() and setColumnMinimumWidth().

pub unsafe fn set_row_stretch(&mut self, row: c_int, stretch: c_int)[src]

Sets the stretch factor of row row to stretch. The first row is number 0.

Calls C++ function: void QGridLayout::setRowStretch(int row, int stretch).

C++ documentation:

Sets the stretch factor of row row to stretch. The first row is number 0.

The stretch factor is relative to the other rows in this grid. Rows with a higher stretch factor take more of the available space.

The default stretch factor is 0. If the stretch factor is 0 and no other row in this table can grow at all, the row may still grow.

See also rowStretch(), setRowMinimumHeight(), and setColumnStretch().

pub unsafe fn set_spacing(&mut self, spacing: c_int)[src]

This function sets both the vertical and horizontal spacing to spacing.

Calls C++ function: void QGridLayout::setSpacing(int spacing).

C++ documentation:

This function sets both the vertical and horizontal spacing to spacing.

See also spacing(), setVerticalSpacing(), and setHorizontalSpacing().

pub unsafe fn set_vertical_spacing(&mut self, spacing: c_int)[src]

This property holds the spacing between widgets that are laid out on top of each other

Calls C++ function: void QGridLayout::setVerticalSpacing(int spacing).

C++ documentation:

This property holds the spacing between widgets that are laid out on top of each other

If no value is explicitly set, the layout's vertical spacing is inherited from the parent layout, or from the style settings for the parent widget.

This property was introduced in Qt 4.3.

Access functions:

int verticalSpacing() const
void setVerticalSpacing(int spacing)

See also horizontalSpacing, QStyle::pixelMetric(), and PM_LayoutHorizontalSpacing.

pub unsafe fn size_hint(&self) -> CppBox<QSize>[src]

Reimplemented from QLayoutItem::sizeHint().

Calls C++ function: virtual QSize QGridLayout::sizeHint() const.

C++ documentation:

Reimplemented from QLayoutItem::sizeHint().

pub unsafe fn spacing(&self) -> c_int[src]

If the vertical spacing is equal to the horizontal spacing, this function returns that value; otherwise it return -1.

Calls C++ function: int QGridLayout::spacing() const.

C++ documentation:

If the vertical spacing is equal to the horizontal spacing, this function returns that value; otherwise it return -1.

See also setSpacing(), verticalSpacing(), and horizontalSpacing().

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn take_at(&mut self, index: c_int) -> MutPtr<QLayoutItem>[src]

Reimplemented from QLayout::takeAt().

Calls C++ function: virtual QLayoutItem* QGridLayout::takeAt(int index).

C++ documentation:

Reimplemented from QLayout::takeAt().

pub unsafe fn tr(
    s: impl CastInto<Ptr<c_char>>,
    c: impl CastInto<Ptr<c_char>>,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QGridLayout::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: impl CastInto<Ptr<c_char>>,
    c: impl CastInto<Ptr<c_char>>,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QGridLayout::trUtf8(const char* s, const char* c, int n).

pub unsafe fn vertical_spacing(&self) -> c_int[src]

This property holds the spacing between widgets that are laid out on top of each other

Calls C++ function: int QGridLayout::verticalSpacing() const.

C++ documentation:

This property holds the spacing between widgets that are laid out on top of each other

If no value is explicitly set, the layout's vertical spacing is inherited from the parent layout, or from the style settings for the parent widget.

This property was introduced in Qt 4.3.

Access functions:

int verticalSpacing() const
void setVerticalSpacing(int spacing)

See also horizontalSpacing, QStyle::pixelMetric(), and PM_LayoutHorizontalSpacing.

Methods from Deref<Target = QLayout>

pub unsafe fn activate(&mut self) -> bool[src]

Redoes the layout for parentWidget() if necessary.

Calls C++ function: bool QLayout::activate().

C++ documentation:

Redoes the layout for parentWidget() if necessary.

You should generally not need to call this because it is automatically called at the most appropriate times. It returns true if the layout was redone.

See also update() and QWidget::updateGeometry().

pub unsafe fn add_item(&mut self, arg1: impl CastInto<MutPtr<QLayoutItem>>)[src]

Implemented in subclasses to add an item. How it is added is specific to each subclass.

Calls C++ function: pure virtual void QLayout::addItem(QLayoutItem* arg1).

C++ documentation:

Implemented in subclasses to add an item. How it is added is specific to each subclass.

This function is not usually called in application code. To add a widget to a layout, use the addWidget() function; to add a child layout, use the addLayout() function provided by the relevant QLayout subclass.

Note: The ownership of item is transferred to the layout, and it's the layout's responsibility to delete it.

See also addWidget(), QBoxLayout::addLayout(), and QGridLayout::addLayout().

pub unsafe fn add_widget(&mut self, w: impl CastInto<MutPtr<QWidget>>)[src]

Adds widget w to this layout in a manner specific to the layout. This function uses addItem().

Calls C++ function: void QLayout::addWidget(QWidget* w).

C++ documentation:

Adds widget w to this layout in a manner specific to the layout. This function uses addItem().

pub unsafe fn contents_margins(&self) -> CppBox<QMargins>[src]

Returns the margins used around the layout.

Calls C++ function: QMargins QLayout::contentsMargins() const.

C++ documentation:

Returns the margins used around the layout.

By default, QLayout uses the values provided by the style. On most platforms, the margin is 11 pixels in all directions.

This function was introduced in Qt 4.6.

See also setContentsMargins().

pub unsafe fn contents_rect(&self) -> CppBox<QRect>[src]

Returns the layout's geometry() rectangle, but taking into account the contents margins.

Calls C++ function: QRect QLayout::contentsRect() const.

C++ documentation:

Returns the layout's geometry() rectangle, but taking into account the contents margins.

This function was introduced in Qt 4.3.

See also setContentsMargins() and getContentsMargins().

pub unsafe fn control_types(&self) -> QFlags<ControlType>[src]

Reimplemented from QLayoutItem::controlTypes().

Calls C++ function: virtual QFlags<QSizePolicy::ControlType> QLayout::controlTypes() const.

C++ documentation:

Reimplemented from QLayoutItem::controlTypes().

pub unsafe fn count(&self) -> c_int[src]

Must be implemented in subclasses to return the number of items in the layout.

Calls C++ function: pure virtual int QLayout::count() const.

C++ documentation:

Must be implemented in subclasses to return the number of items in the layout.

See also itemAt().

pub unsafe fn expanding_directions(&self) -> QFlags<Orientation>[src]

Reimplemented from QLayoutItem::expandingDirections().

Calls C++ function: virtual QFlags<Qt::Orientation> QLayout::expandingDirections() const.

C++ documentation:

Reimplemented from QLayoutItem::expandingDirections().

Returns whether this layout can make use of more space than sizeHint(). A value of Qt::Vertical or Qt::Horizontal means that it wants to grow in only one dimension, whereas Qt::Vertical | Qt::Horizontal means that it wants to grow in both dimensions.

The default implementation returns Qt::Horizontal | Qt::Vertical. Subclasses reimplement it to return a meaningful value based on their child widgets's size policies.

See also sizeHint().

pub unsafe fn geometry(&self) -> CppBox<QRect>[src]

Reimplemented from QLayoutItem::geometry().

Calls C++ function: virtual QRect QLayout::geometry() const.

C++ documentation:

Reimplemented from QLayoutItem::geometry().

See also setGeometry().

pub unsafe fn get_contents_margins(
    &self,
    left: impl CastInto<MutPtr<c_int>>,
    top: impl CastInto<MutPtr<c_int>>,
    right: impl CastInto<MutPtr<c_int>>,
    bottom: impl CastInto<MutPtr<c_int>>
)
[src]

Extracts the left, top, right, and bottom margins used around the layout, and assigns them to *left, *top, *right, and *bottom (unless they are null pointers).

Calls C++ function: void QLayout::getContentsMargins(int* left, int* top, int* right, int* bottom) const.

C++ documentation:

Extracts the left, top, right, and bottom margins used around the layout, and assigns them to *left, *top, *right, and *bottom (unless they are null pointers).

By default, QLayout uses the values provided by the style. On most platforms, the margin is 11 pixels in all directions.

This function was introduced in Qt 4.3.

See also setContentsMargins(), QStyle::pixelMetric(), PM_LayoutLeftMargin, PM_LayoutTopMargin, PM_LayoutRightMargin, and PM_LayoutBottomMargin.

pub unsafe fn index_of_q_widget(
    &self,
    arg1: impl CastInto<MutPtr<QWidget>>
) -> c_int
[src]

Searches for widget widget in this layout (not including child layouts).

Calls C++ function: virtual int QLayout::indexOf(QWidget* arg1) const.

C++ documentation:

Searches for widget widget in this layout (not including child layouts).

Returns the index of widget, or -1 if widget is not found.

The default implementation iterates over all items using itemAt()

pub unsafe fn index_of_q_layout_item(
    &self,
    arg1: impl CastInto<MutPtr<QLayoutItem>>
) -> c_int
[src]

Searches for layout item layoutItem in this layout (not including child layouts).

Calls C++ function: int QLayout::indexOf(QLayoutItem* arg1) const.

C++ documentation:

Searches for layout item layoutItem in this layout (not including child layouts).

Returns the index of layoutItem, or -1 if layoutItem is not found.

This function was introduced in Qt 5.12.

This item is available if any(cpp_lib_version="5.12.2", cpp_lib_version="5.13.0").

pub unsafe fn invalidate(&mut self)[src]

Reimplemented from QLayoutItem::invalidate().

Calls C++ function: virtual void QLayout::invalidate().

C++ documentation:

Reimplemented from QLayoutItem::invalidate().

pub unsafe fn is_empty(&self) -> bool[src]

Reimplemented from QLayoutItem::isEmpty().

Calls C++ function: virtual bool QLayout::isEmpty() const.

C++ documentation:

Reimplemented from QLayoutItem::isEmpty().

pub unsafe fn is_enabled(&self) -> bool[src]

Returns true if the layout is enabled; otherwise returns false.

Calls C++ function: bool QLayout::isEnabled() const.

C++ documentation:

Returns true if the layout is enabled; otherwise returns false.

See also setEnabled().

pub unsafe fn item_at(&self, index: c_int) -> MutPtr<QLayoutItem>[src]

Must be implemented in subclasses to return the layout item at index. If there is no such item, the function must return 0. Items are numbered consecutively from 0. If an item is deleted, other items will be renumbered.

Calls C++ function: pure virtual QLayoutItem* QLayout::itemAt(int index) const.

C++ documentation:

Must be implemented in subclasses to return the layout item at index. If there is no such item, the function must return 0. Items are numbered consecutively from 0. If an item is deleted, other items will be renumbered.

This function can be used to iterate over a layout. The following code will draw a rectangle for each layout item in the layout structure of the widget.

static void paintLayout(QPainter painter, QLayoutItem item) { QLayout *layout = item->layout(); if (layout) { for (int i = 0; i < layout->count(); ++i) paintLayout(painter, layout->itemAt(i)); } painter->drawRect(item->geometry()); }

void MyWidget::paintEvent(QPaintEvent *) { QPainter painter(this); if (layout()) paintLayout(&painter, layout()); }

See also count() and takeAt().

pub unsafe fn layout(&mut self) -> MutPtr<QLayout>[src]

Reimplemented from QLayoutItem::layout().

Calls C++ function: virtual QLayout* QLayout::layout().

C++ documentation:

Reimplemented from QLayoutItem::layout().

pub unsafe fn margin(&self) -> c_int[src]

This property holds the width of the outside border of the layout

Calls C++ function: int QLayout::margin() const.

C++ documentation:

This property holds the width of the outside border of the layout

Use setContentsMargins() and getContentsMargins() instead.

Access functions:

int margin() const
void setMargin(int margin)

See also contentsRect() and spacing.

Member Function Documentation

pub unsafe fn maximum_size(&self) -> CppBox<QSize>[src]

Reimplemented from QLayoutItem::maximumSize().

Calls C++ function: virtual QSize QLayout::maximumSize() const.

C++ documentation:

Reimplemented from QLayoutItem::maximumSize().

Returns the maximum size of this layout. This is the largest size that the layout can have while still respecting the specifications.

The returned value doesn't include the space required by QWidget::setContentsMargins() or menuBar().

The default implementation allows unlimited resizing.

pub unsafe fn menu_bar(&self) -> MutPtr<QWidget>[src]

Returns the menu bar set for this layout, or 0 if no menu bar is set.

Calls C++ function: QWidget* QLayout::menuBar() const.

C++ documentation:

Returns the menu bar set for this layout, or 0 if no menu bar is set.

See also setMenuBar().

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QLayout::metaObject() const.

pub unsafe fn minimum_size(&self) -> CppBox<QSize>[src]

Reimplemented from QLayoutItem::minimumSize().

Calls C++ function: virtual QSize QLayout::minimumSize() const.

C++ documentation:

Reimplemented from QLayoutItem::minimumSize().

Returns the minimum size of this layout. This is the smallest size that the layout can have while still respecting the specifications.

The returned value doesn't include the space required by QWidget::setContentsMargins() or menuBar().

The default implementation allows unlimited resizing.

pub unsafe fn parent_widget(&self) -> MutPtr<QWidget>[src]

Returns the parent widget of this layout, or 0 if this layout is not installed on any widget.

Calls C++ function: QWidget* QLayout::parentWidget() const.

C++ documentation:

Returns the parent widget of this layout, or 0 if this layout is not installed on any widget.

If the layout is a sub-layout, this function returns the parent widget of the parent layout.

See also parent().

pub unsafe fn qt_metacall(
    &mut self,
    arg1: Call,
    arg2: c_int,
    arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]

Calls C++ function: virtual int QLayout::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(
    &mut self,
    arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]

Calls C++ function: virtual void* QLayout::qt_metacast(const char* arg1).

pub unsafe fn remove_item(&mut self, arg1: impl CastInto<MutPtr<QLayoutItem>>)[src]

Removes the layout item item from the layout. It is the caller's responsibility to delete the item.

Calls C++ function: void QLayout::removeItem(QLayoutItem* arg1).

C++ documentation:

Removes the layout item item from the layout. It is the caller's responsibility to delete the item.

Notice that item can be a layout (since QLayout inherits QLayoutItem).

See also removeWidget() and addItem().

pub unsafe fn remove_widget(&mut self, w: impl CastInto<MutPtr<QWidget>>)[src]

Removes the widget widget from the layout. After this call, it is the caller's responsibility to give the widget a reasonable geometry or to put the widget back into a layout or to explicitly hide it if necessary.

Calls C++ function: void QLayout::removeWidget(QWidget* w).

C++ documentation:

Removes the widget widget from the layout. After this call, it is the caller's responsibility to give the widget a reasonable geometry or to put the widget back into a layout or to explicitly hide it if necessary.

Note: The ownership of widget remains the same as when it was added.

See also removeItem(), QWidget::setGeometry(), and addWidget().

pub unsafe fn replace_widget_3a(
    &mut self,
    from: impl CastInto<MutPtr<QWidget>>,
    to: impl CastInto<MutPtr<QWidget>>,
    options: QFlags<FindChildOption>
) -> MutPtr<QLayoutItem>
[src]

Searches for widget from and replaces it with widget to if found. Returns the layout item that contains the widget from on success. Otherwise 0 is returned. If options contains Qt::FindChildrenRecursively (the default), sub-layouts are searched for doing the replacement. Any other flag in options is ignored.

Calls C++ function: QLayoutItem* QLayout::replaceWidget(QWidget* from, QWidget* to, QFlags<Qt::FindChildOption> options = …).

C++ documentation:

Searches for widget from and replaces it with widget to if found. Returns the layout item that contains the widget from on success. Otherwise 0 is returned. If options contains Qt::FindChildrenRecursively (the default), sub-layouts are searched for doing the replacement. Any other flag in options is ignored.

Notice that the returned item therefore might not belong to this layout, but to a sub-layout.

The returned layout item is no longer owned by the layout and should be either deleted or inserted to another layout. The widget from is no longer managed by the layout and may need to be deleted or hidden. The parent of widget from is left unchanged.

This function works for the built-in Qt layouts, but might not work for custom layouts.

This function was introduced in Qt 5.2.

See also indexOf().

pub unsafe fn replace_widget_2a(
    &mut self,
    from: impl CastInto<MutPtr<QWidget>>,
    to: impl CastInto<MutPtr<QWidget>>
) -> MutPtr<QLayoutItem>
[src]

Searches for widget from and replaces it with widget to if found. Returns the layout item that contains the widget from on success. Otherwise 0 is returned. If options contains Qt::FindChildrenRecursively (the default), sub-layouts are searched for doing the replacement. Any other flag in options is ignored.

Calls C++ function: QLayoutItem* QLayout::replaceWidget(QWidget* from, QWidget* to).

C++ documentation:

Searches for widget from and replaces it with widget to if found. Returns the layout item that contains the widget from on success. Otherwise 0 is returned. If options contains Qt::FindChildrenRecursively (the default), sub-layouts are searched for doing the replacement. Any other flag in options is ignored.

Notice that the returned item therefore might not belong to this layout, but to a sub-layout.

The returned layout item is no longer owned by the layout and should be either deleted or inserted to another layout. The widget from is no longer managed by the layout and may need to be deleted or hidden. The parent of widget from is left unchanged.

This function works for the built-in Qt layouts, but might not work for custom layouts.

This function was introduced in Qt 5.2.

See also indexOf().

pub unsafe fn set_alignment_q_widget_q_flags_alignment_flag(
    &mut self,
    w: impl CastInto<MutPtr<QWidget>>,
    alignment: QFlags<AlignmentFlag>
) -> bool
[src]

Sets the alignment for widget w to alignment and returns true if w is found in this layout (not including child layouts); otherwise returns false.

Calls C++ function: bool QLayout::setAlignment(QWidget* w, QFlags<Qt::AlignmentFlag> alignment).

C++ documentation:

Sets the alignment for widget w to alignment and returns true if w is found in this layout (not including child layouts); otherwise returns false.

pub unsafe fn set_alignment_q_layout_q_flags_alignment_flag(
    &mut self,
    l: impl CastInto<MutPtr<QLayout>>,
    alignment: QFlags<AlignmentFlag>
) -> bool
[src]

This is an overloaded function.

Calls C++ function: bool QLayout::setAlignment(QLayout* l, QFlags<Qt::AlignmentFlag> alignment).

C++ documentation:

This is an overloaded function.

Sets the alignment for the layout l to alignment and returns true if l is found in this layout (not including child layouts); otherwise returns false.

pub unsafe fn set_contents_margins_4a(
    &mut self,
    left: c_int,
    top: c_int,
    right: c_int,
    bottom: c_int
)
[src]

Sets the left, top, right, and bottom margins to use around the layout.

Calls C++ function: void QLayout::setContentsMargins(int left, int top, int right, int bottom).

C++ documentation:

Sets the left, top, right, and bottom margins to use around the layout.

By default, QLayout uses the values provided by the style. On most platforms, the margin is 11 pixels in all directions.

This function was introduced in Qt 4.3.

See also contentsMargins(), getContentsMargins(), QStyle::pixelMetric(), PM_LayoutLeftMargin, PM_LayoutTopMargin, PM_LayoutRightMargin, and PM_LayoutBottomMargin.

pub unsafe fn set_contents_margins_1a(
    &mut self,
    margins: impl CastInto<Ref<QMargins>>
)
[src]

Sets the margins to use around the layout.

Calls C++ function: void QLayout::setContentsMargins(const QMargins& margins).

C++ documentation:

Sets the margins to use around the layout.

By default, QLayout uses the values provided by the style. On most platforms, the margin is 11 pixels in all directions.

This function was introduced in Qt 4.6.

See also contentsMargins().

pub unsafe fn set_enabled(&mut self, arg1: bool)[src]

Enables this layout if enable is true, otherwise disables it.

Calls C++ function: void QLayout::setEnabled(bool arg1).

C++ documentation:

Enables this layout if enable is true, otherwise disables it.

An enabled layout adjusts dynamically to changes; a disabled layout acts as if it did not exist.

By default all layouts are enabled.

See also isEnabled().

pub unsafe fn set_geometry(&mut self, arg1: impl CastInto<Ref<QRect>>)[src]

Reimplemented from QLayoutItem::setGeometry().

Calls C++ function: virtual void QLayout::setGeometry(const QRect& arg1).

C++ documentation:

Reimplemented from QLayoutItem::setGeometry().

See also geometry().

pub unsafe fn set_margin(&mut self, arg1: c_int)[src]

Note: Setter function for property margin.

Calls C++ function: void QLayout::setMargin(int arg1).

C++ documentation:

Note: Setter function for property margin.

See also margin().

pub unsafe fn set_menu_bar(&mut self, w: impl CastInto<MutPtr<QWidget>>)[src]

Tells the geometry manager to place the menu bar widget at the top of parentWidget(), outside QWidget::contentsMargins(). All child widgets are placed below the bottom edge of the menu bar.

Calls C++ function: void QLayout::setMenuBar(QWidget* w).

C++ documentation:

Tells the geometry manager to place the menu bar widget at the top of parentWidget(), outside QWidget::contentsMargins(). All child widgets are placed below the bottom edge of the menu bar.

See also menuBar().

pub unsafe fn set_size_constraint(&mut self, arg1: SizeConstraint)[src]

This property holds the resize mode of the layout

Calls C++ function: void QLayout::setSizeConstraint(QLayout::SizeConstraint arg1).

C++ documentation:

This property holds the resize mode of the layout

The default mode is SetDefaultConstraint.

Access functions:

SizeConstraint sizeConstraint() const
void setSizeConstraint(SizeConstraint)

pub unsafe fn set_spacing(&mut self, arg1: c_int)[src]

This property holds the spacing between widgets inside the layout

Calls C++ function: void QLayout::setSpacing(int arg1).

C++ documentation:

This property holds the spacing between widgets inside the layout

If no value is explicitly set, the layout's spacing is inherited from the parent layout, or from the style settings for the parent widget.

For QGridLayout and QFormLayout, it is possible to set different horizontal and vertical spacings using setHorizontalSpacing() and setVerticalSpacing(). In that case, spacing() returns -1.

Access functions:

int spacing() const
void setSpacing(int)

See also contentsRect(), getContentsMargins(), QStyle::layoutSpacing(), and QStyle::pixelMetric().

pub unsafe fn size_constraint(&self) -> SizeConstraint[src]

This property holds the resize mode of the layout

Calls C++ function: QLayout::SizeConstraint QLayout::sizeConstraint() const.

C++ documentation:

This property holds the resize mode of the layout

The default mode is SetDefaultConstraint.

Access functions:

SizeConstraint sizeConstraint() const
void setSizeConstraint(SizeConstraint)

pub unsafe fn spacing(&self) -> c_int[src]

This property holds the spacing between widgets inside the layout

Calls C++ function: int QLayout::spacing() const.

C++ documentation:

This property holds the spacing between widgets inside the layout

If no value is explicitly set, the layout's spacing is inherited from the parent layout, or from the style settings for the parent widget.

For QGridLayout and QFormLayout, it is possible to set different horizontal and vertical spacings using setHorizontalSpacing() and setVerticalSpacing(). In that case, spacing() returns -1.

Access functions:

int spacing() const
void setSpacing(int)

See also contentsRect(), getContentsMargins(), QStyle::layoutSpacing(), and QStyle::pixelMetric().

pub unsafe fn take_at(&mut self, index: c_int) -> MutPtr<QLayoutItem>[src]

Must be implemented in subclasses to remove the layout item at index from the layout, and return the item. If there is no such item, the function must do nothing and return 0. Items are numbered consecutively from 0. If an item is removed, other items will be renumbered.

Calls C++ function: pure virtual QLayoutItem* QLayout::takeAt(int index).

C++ documentation:

Must be implemented in subclasses to remove the layout item at index from the layout, and return the item. If there is no such item, the function must do nothing and return 0. Items are numbered consecutively from 0. If an item is removed, other items will be renumbered.

The following code fragment shows a safe way to remove all items from a layout:

QLayoutItem *child; while ((child = layout->takeAt(0)) != 0) { ... delete child; }

See also itemAt() and count().

pub unsafe fn total_height_for_width(&self, w: c_int) -> c_int[src]

Calls C++ function: int QLayout::totalHeightForWidth(int w) const.

pub unsafe fn total_maximum_size(&self) -> CppBox<QSize>[src]

Calls C++ function: QSize QLayout::totalMaximumSize() const.

pub unsafe fn total_minimum_size(&self) -> CppBox<QSize>[src]

Calls C++ function: QSize QLayout::totalMinimumSize() const.

pub unsafe fn total_size_hint(&self) -> CppBox<QSize>[src]

Calls C++ function: QSize QLayout::totalSizeHint() const.

pub unsafe fn update(&mut self)[src]

Updates the layout for parentWidget().

Calls C++ function: void QLayout::update().

C++ documentation:

Updates the layout for parentWidget().

You should generally not need to call this because it is automatically called at the most appropriate times.

See also activate() and invalidate().

Trait Implementations

impl CppDeletable for QGridLayout[src]

unsafe fn delete(&mut self)[src]

Destroys the grid layout. Geometry management is terminated if this is a top-level grid.

Calls C++ function: virtual [destructor] void QGridLayout::~QGridLayout().

C++ documentation:

Destroys the grid layout. Geometry management is terminated if this is a top-level grid.

The layout's widgets aren't destroyed.

impl Deref for QGridLayout[src]

type Target = QLayout

The resulting type after dereferencing.

fn deref(&self) -> &QLayout[src]

Calls C++ function: QLayout* static_cast<QLayout*>(QGridLayout* ptr).

impl DerefMut for QGridLayout[src]

fn deref_mut(&mut self) -> &mut QLayout[src]

Calls C++ function: QLayout* static_cast<QLayout*>(QGridLayout* ptr).

impl DynamicCast<QGridLayout> for QLayout[src]

unsafe fn dynamic_cast(ptr: Ptr<QLayout>) -> Ptr<QGridLayout>[src]

Calls C++ function: QGridLayout* dynamic_cast<QGridLayout*>(QLayout* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QLayout>) -> MutPtr<QGridLayout>[src]

Calls C++ function: QGridLayout* dynamic_cast<QGridLayout*>(QLayout* ptr).

impl DynamicCast<QGridLayout> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QGridLayout>[src]

Calls C++ function: QGridLayout* dynamic_cast<QGridLayout*>(QObject* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QObject>) -> MutPtr<QGridLayout>[src]

Calls C++ function: QGridLayout* dynamic_cast<QGridLayout*>(QObject* ptr).

impl DynamicCast<QGridLayout> for QLayoutItem[src]

unsafe fn dynamic_cast(ptr: Ptr<QLayoutItem>) -> Ptr<QGridLayout>[src]

Calls C++ function: QGridLayout* dynamic_cast<QGridLayout*>(QLayoutItem* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QLayoutItem>) -> MutPtr<QGridLayout>[src]

Calls C++ function: QGridLayout* dynamic_cast<QGridLayout*>(QLayoutItem* ptr).

impl StaticDowncast<QGridLayout> for QLayout[src]

unsafe fn static_downcast(ptr: Ptr<QLayout>) -> Ptr<QGridLayout>[src]

Calls C++ function: QGridLayout* static_cast<QGridLayout*>(QLayout* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QLayout>) -> MutPtr<QGridLayout>[src]

Calls C++ function: QGridLayout* static_cast<QGridLayout*>(QLayout* ptr).

impl StaticDowncast<QGridLayout> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QGridLayout>[src]

Calls C++ function: QGridLayout* static_cast<QGridLayout*>(QObject* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QObject>) -> MutPtr<QGridLayout>[src]

Calls C++ function: QGridLayout* static_cast<QGridLayout*>(QObject* ptr).

impl StaticDowncast<QGridLayout> for QLayoutItem[src]

unsafe fn static_downcast(ptr: Ptr<QLayoutItem>) -> Ptr<QGridLayout>[src]

Calls C++ function: QGridLayout* static_cast<QGridLayout*>(QLayoutItem* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QLayoutItem>) -> MutPtr<QGridLayout>[src]

Calls C++ function: QGridLayout* static_cast<QGridLayout*>(QLayoutItem* ptr).

impl StaticUpcast<QLayout> for QGridLayout[src]

unsafe fn static_upcast(ptr: Ptr<QGridLayout>) -> Ptr<QLayout>[src]

Calls C++ function: QLayout* static_cast<QLayout*>(QGridLayout* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QGridLayout>) -> MutPtr<QLayout>[src]

Calls C++ function: QLayout* static_cast<QLayout*>(QGridLayout* ptr).

impl StaticUpcast<QLayoutItem> for QGridLayout[src]

unsafe fn static_upcast(ptr: Ptr<QGridLayout>) -> Ptr<QLayoutItem>[src]

Calls C++ function: QLayoutItem* static_cast<QLayoutItem*>(QGridLayout* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QGridLayout>) -> MutPtr<QLayoutItem>[src]

Calls C++ function: QLayoutItem* static_cast<QLayoutItem*>(QGridLayout* ptr).

impl StaticUpcast<QObject> for QGridLayout[src]

unsafe fn static_upcast(ptr: Ptr<QGridLayout>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QGridLayout* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QGridLayout>) -> MutPtr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QGridLayout* ptr).

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.