Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QGraphicsGridLayout Class Reference

The QGraphicsGridLayout class provides a grid layout for managing widgets in Graphics View. More...

#include <qgraphicsgridlayout.h>

+ Inheritance diagram for QGraphicsGridLayout:
+ Collaboration diagram for QGraphicsGridLayout:

Public Member Functions

 QGraphicsGridLayout (QGraphicsLayoutItem *parent=nullptr)
 Constructs a QGraphicsGridLayout instance.
 
virtual ~QGraphicsGridLayout ()
 Destroys the QGraphicsGridLayout object.
 
void addItem (QGraphicsLayoutItem *item, int row, int column, int rowSpan, int columnSpan, Qt::Alignment alignment=Qt::Alignment())
 Adds item to the grid on row and column.
 
void addItem (QGraphicsLayoutItem *item, int row, int column, Qt::Alignment alignment=Qt::Alignment())
 Adds item to the grid on row and column.
 
void setHorizontalSpacing (qreal spacing)
 Sets the default horizontal spacing for the grid layout to spacing.
 
qreal horizontalSpacing () const
 Returns the default horizontal spacing for the grid layout.
 
void setVerticalSpacing (qreal spacing)
 Sets the default vertical spacing for the grid layout to spacing.
 
qreal verticalSpacing () const
 Returns the default vertical spacing for the grid layout.
 
void setSpacing (qreal spacing)
 Sets the grid layout's default spacing, both vertical and horizontal, to spacing.
 
void setRowSpacing (int row, qreal spacing)
 Sets the spacing for row to spacing.
 
qreal rowSpacing (int row) const
 Returns the row spacing for row.
 
void setColumnSpacing (int column, qreal spacing)
 Sets the spacing for column to spacing.
 
qreal columnSpacing (int column) const
 Returns the column spacing for column.
 
void setRowStretchFactor (int row, int stretch)
 Sets the stretch factor for row to stretch.
 
int rowStretchFactor (int row) const
 Returns the stretch factor for row.
 
void setColumnStretchFactor (int column, int stretch)
 Sets the stretch factor for column to stretch.
 
int columnStretchFactor (int column) const
 Returns the stretch factor for column.
 
void setRowMinimumHeight (int row, qreal height)
 Sets the minimum height for row, row, to height.
 
qreal rowMinimumHeight (int row) const
 Returns the minimum height for row, row.
 
void setRowPreferredHeight (int row, qreal height)
 Sets the preferred height for row, row, to height.
 
qreal rowPreferredHeight (int row) const
 Returns the preferred height for row, row.
 
void setRowMaximumHeight (int row, qreal height)
 Sets the maximum height for row, row, to height.
 
qreal rowMaximumHeight (int row) const
 Returns the maximum height for row, row.
 
void setRowFixedHeight (int row, qreal height)
 Sets the fixed height for row, row, to height.
 
void setColumnMinimumWidth (int column, qreal width)
 Sets the minimum width for column to width.
 
qreal columnMinimumWidth (int column) const
 Returns the minimum width for column.
 
void setColumnPreferredWidth (int column, qreal width)
 Sets the preferred width for column to width.
 
qreal columnPreferredWidth (int column) const
 Returns the preferred width for column.
 
void setColumnMaximumWidth (int column, qreal width)
 Sets the maximum width of column to width.
 
qreal columnMaximumWidth (int column) const
 Returns the maximum width for column.
 
void setColumnFixedWidth (int column, qreal width)
 Sets the fixed width of column to width.
 
void setRowAlignment (int row, Qt::Alignment alignment)
 Sets the alignment of row to alignment.
 
Qt::Alignment rowAlignment (int row) const
 Returns the alignment of row.
 
void setColumnAlignment (int column, Qt::Alignment alignment)
 Sets the alignment for column to alignment.
 
Qt::Alignment columnAlignment (int column) const
 Returns the alignment for column.
 
void setAlignment (QGraphicsLayoutItem *item, Qt::Alignment alignment)
 Sets the alignment for item to alignment.
 
Qt::Alignment alignment (QGraphicsLayoutItem *item) const
 Returns the alignment for item.
 
int rowCount () const
 Returns the number of rows in the grid layout.
 
int columnCount () const
 Returns the number of columns in the grid layout.
 
QGraphicsLayoutItemitemAt (int row, int column) const
 Returns a pointer to the layout item at (row, column).
 
int count () const override
 Returns the number of layout items in this grid layout.
 
QGraphicsLayoutItemitemAt (int index) const override
 Returns the layout item at index, or \nullptr if there is no layout item at this index.
 
void removeAt (int index) override
 Removes the layout item at index without destroying it.
 
void removeItem (QGraphicsLayoutItem *item)
 Removes the layout item item without destroying it.
 
void invalidate () override
 \reimp
 
void setGeometry (const QRectF &rect) override
 Sets the bounding geometry of the grid layout to rect.
 
QSizeF sizeHint (Qt::SizeHint which, const QSizeF &constraint=QSizeF()) const override
 \reimp
 
- Public Member Functions inherited from QGraphicsLayout
 QGraphicsLayout (QGraphicsLayoutItem *parent=nullptr)
 Constructs a QGraphicsLayout object.
 
 ~QGraphicsLayout ()
 Destroys the QGraphicsLayout object.
 
void setContentsMargins (qreal left, qreal top, qreal right, qreal bottom)
 Sets the contents margins to left, top, right and bottom.
 
void getContentsMargins (qreal *left, qreal *top, qreal *right, qreal *bottom) const override
 \reimp
 
void activate ()
 Activates the layout, causing all items in the layout to be immediately rearranged.
 
bool isActivated () const
 Returns true if the layout is currently being activated; otherwise, returns false.
 
virtual void updateGeometry () override
 \reimp
 
virtual void widgetEvent (QEvent *e)
 This virtual event handler receives all events for the managed widget.
 
- Public Member Functions inherited from QGraphicsLayoutItem
 QGraphicsLayoutItem (QGraphicsLayoutItem *parent=nullptr, bool isLayout=false)
 Constructs the QGraphicsLayoutItem object.
 
virtual ~QGraphicsLayoutItem ()
 Destroys the QGraphicsLayoutItem object.
 
void setSizePolicy (const QSizePolicy &policy)
 Sets the size policy to policy.
 
void setSizePolicy (QSizePolicy::Policy hPolicy, QSizePolicy::Policy vPolicy, QSizePolicy::ControlType controlType=QSizePolicy::DefaultType)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.This function is equivalent to calling setSizePolicy(QSizePolicy(hPolicy, vPolicy, controlType)).
 
QSizePolicy sizePolicy () const
 Returns the current size policy.
 
void setMinimumSize (const QSizeF &size)
 Sets the minimum size to size.
 
void setMinimumSize (qreal w, qreal h)
 This convenience function is equivalent to calling setMinimumSize(QSizeF(w, h)).
 
QSizeF minimumSize () const
 Returns the minimum size.
 
void setMinimumWidth (qreal width)
 Sets the minimum width to width.
 
qreal minimumWidth () const
 Returns the minimum width.
 
void setMinimumHeight (qreal height)
 Sets the minimum height to height.
 
qreal minimumHeight () const
 Returns the minimum height.
 
void setPreferredSize (const QSizeF &size)
 Sets the preferred size to size.
 
void setPreferredSize (qreal w, qreal h)
 This convenience function is equivalent to calling setPreferredSize(QSizeF(w, h)).
 
QSizeF preferredSize () const
 Returns the preferred size.
 
void setPreferredWidth (qreal width)
 Sets the preferred width to width.
 
qreal preferredWidth () const
 Returns the preferred width.
 
void setPreferredHeight (qreal height)
 Sets the preferred height to height.
 
qreal preferredHeight () const
 Returns the preferred height.
 
void setMaximumSize (const QSizeF &size)
 Sets the maximum size to size.
 
void setMaximumSize (qreal w, qreal h)
 This convenience function is equivalent to calling setMaximumSize(QSizeF(w, h)).
 
QSizeF maximumSize () const
 Returns the maximum size.
 
void setMaximumWidth (qreal width)
 Sets the maximum width to width.
 
qreal maximumWidth () const
 Returns the maximum width.
 
void setMaximumHeight (qreal height)
 Sets the maximum height to height.
 
qreal maximumHeight () const
 Returns the maximum height.
 
QRectF geometry () const
 Returns the item's geometry (e.g., position and size) as a QRectF.
 
QRectF contentsRect () const
 Returns the contents rect in local coordinates.
 
QSizeF effectiveSizeHint (Qt::SizeHint which, const QSizeF &constraint=QSizeF()) const
 Returns the effective size hint for this QGraphicsLayoutItem.
 
virtual bool isEmpty () const
 
QGraphicsLayoutItemparentLayoutItem () const
 Returns the parent of this QGraphicsLayoutItem, or \nullptr if there is no parent, or if the parent does not inherit from QGraphicsLayoutItem (QGraphicsLayoutItem is often used through multiple inheritance with QObject-derived classes).
 
void setParentLayoutItem (QGraphicsLayoutItem *parent)
 Sets the parent of this QGraphicsLayoutItem to parent.
 
bool isLayout () const
 Returns true if this QGraphicsLayoutItem is a layout (e.g., is inherited by an object that arranges other QGraphicsLayoutItem objects); otherwise returns false.
 
QGraphicsItemgraphicsItem () const
 Returns the QGraphicsItem that this layout item represents.
 
bool ownedByLayout () const
 

Additional Inherited Members

- Static Public Member Functions inherited from QGraphicsLayout
static void setInstantInvalidatePropagation (bool enable)
 
static bool instantInvalidatePropagation ()
 
- Protected Member Functions inherited from QGraphicsLayout
 QGraphicsLayout (QGraphicsLayoutPrivate &, QGraphicsLayoutItem *)
 
void addChildLayoutItem (QGraphicsLayoutItem *layoutItem)
 
- Protected Member Functions inherited from QGraphicsLayoutItem
void setGraphicsItem (QGraphicsItem *item)
 If the QGraphicsLayoutItem represents a QGraphicsItem, and it wants to take advantage of the automatic reparenting capabilities of QGraphicsLayout it should set this value.
 
void setOwnedByLayout (bool ownedByLayout)
 
 QGraphicsLayoutItem (QGraphicsLayoutItemPrivate &dd)
 
- Protected Attributes inherited from QGraphicsLayoutItem
QScopedPointer< QGraphicsLayoutItemPrivated_ptr
 

Detailed Description

The QGraphicsGridLayout class provides a grid layout for managing widgets in Graphics View.

Since
4.4

\inmodule QtWidgets

The most common way to use QGraphicsGridLayout is to construct an object on the heap, passing a parent widget to the constructor, then add widgets and layouts by calling addItem(). QGraphicsGridLayout automatically computes the dimensions of the grid as you add items.

The QGraphicsGridLayout class provides a grid layout for managing widgets in Graphics View.
void addItem(QGraphicsLayoutItem *item, int row, int column, int rowSpan, int columnSpan, Qt::Alignment alignment=Qt::Alignment())
Adds item to the grid on row and column.
void addItem(QGraphicsItem *item)
Adds or moves the item and all its children to this scene.
QGraphicsProxyWidget * addWidget(QWidget *widget, Qt::WindowFlags wFlags=Qt::WindowFlags())
Creates a new QGraphicsProxyWidget for widget, adds it to the scene, and returns a pointer to the pro...
The QGraphicsWidget class is the base class for all widget items in a QGraphicsScene.
QGraphicsGridLayout * layout
QGraphicsWidget * textEdit
QGraphicsWidget * pushButton

Alternatively, if you do not pass a parent widget to the layout's constructor, you will need to call QGraphicsWidget::setLayout() to set this layout as the top-level layout for that widget, the widget will take ownership of the layout.

The layout takes ownership of the items. In some cases when the layout item also inherits from QGraphicsItem (such as QGraphicsWidget) there will be a ambiguity in ownership because the layout item belongs to two ownership hierarchies. See the documentation of QGraphicsLayoutItem::setOwnedByLayout() how to handle this. You can access each item in the layout by calling count() and itemAt(). Calling removeAt() will remove an item from the layout, without destroying it.

Definition at line 17 of file qgraphicsgridlayout.h.

Constructor & Destructor Documentation

◆ QGraphicsGridLayout()

QGraphicsGridLayout::QGraphicsGridLayout ( QGraphicsLayoutItem * parent = nullptr)

Constructs a QGraphicsGridLayout instance.

parent is passed to QGraphicsLayout's constructor.

Definition at line 90 of file qgraphicsgridlayout.cpp.

◆ ~QGraphicsGridLayout()

QGraphicsGridLayout::~QGraphicsGridLayout ( )
virtual

Destroys the QGraphicsGridLayout object.

Definition at line 98 of file qgraphicsgridlayout.cpp.

References count(), i, item, itemAt(), and removeAt().

+ Here is the call graph for this function:

Member Function Documentation

◆ addItem() [1/2]

void QGraphicsGridLayout::addItem ( QGraphicsLayoutItem * item,
int row,
int column,
int rowSpan,
int columnSpan,
Qt::Alignment alignment = Qt::Alignment() )

Adds item to the grid on row and column.

You can specify a rowSpan and columnSpan and an optional alignment.

Definition at line 118 of file qgraphicsgridlayout.cpp.

References alignment, d, invalidate(), item, and qWarning.

Referenced by addItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addItem() [2/2]

void QGraphicsGridLayout::addItem ( QGraphicsLayoutItem * item,
int row,
int column,
Qt::Alignment alignment = Qt::Alignment() )
inline

Adds item to the grid on row and column.

You can specify an optional alignment for item.

Definition at line 93 of file qgraphicsgridlayout.h.

References addItem().

+ Here is the call graph for this function:

◆ alignment()

Qt::Alignment QGraphicsGridLayout::alignment ( QGraphicsLayoutItem * item) const

Returns the alignment for item.

Definition at line 469 of file qgraphicsgridlayout.cpp.

References d, and item.

◆ columnAlignment()

Qt::Alignment QGraphicsGridLayout::columnAlignment ( int column) const

Returns the alignment for column.

Definition at line 450 of file qgraphicsgridlayout.cpp.

References d, and Qt::Horizontal.

◆ columnCount()

int QGraphicsGridLayout::columnCount ( ) const

Returns the number of columns in the grid layout.

This is always one more than the index of the last column that is occupied by a layout item (empty columns are counted except for those at the end).

Definition at line 491 of file qgraphicsgridlayout.cpp.

References d, and Qt::Horizontal.

Referenced by itemAt().

+ Here is the caller graph for this function:

◆ columnMaximumWidth()

qreal QGraphicsGridLayout::columnMaximumWidth ( int column) const

Returns the maximum width for column.

Definition at line 401 of file qgraphicsgridlayout.cpp.

References d, Qt::Horizontal, and Qt::MaximumSize.

◆ columnMinimumWidth()

qreal QGraphicsGridLayout::columnMinimumWidth ( int column) const

Returns the minimum width for column.

Definition at line 363 of file qgraphicsgridlayout.cpp.

References d, Qt::Horizontal, and Qt::MinimumSize.

◆ columnPreferredWidth()

qreal QGraphicsGridLayout::columnPreferredWidth ( int column) const

Returns the preferred width for column.

Definition at line 382 of file qgraphicsgridlayout.cpp.

References d, Qt::Horizontal, and Qt::PreferredSize.

◆ columnSpacing()

qreal QGraphicsGridLayout::columnSpacing ( int column) const

Returns the column spacing for column.

Definition at line 238 of file qgraphicsgridlayout.cpp.

References d, and Qt::Horizontal.

◆ columnStretchFactor()

int QGraphicsGridLayout::columnStretchFactor ( int column) const

Returns the stretch factor for column.

Definition at line 276 of file qgraphicsgridlayout.cpp.

References d, and Qt::Horizontal.

◆ count()

int QGraphicsGridLayout::count ( ) const
overridevirtual

Returns the number of layout items in this grid layout.

Implements QGraphicsLayout.

Definition at line 515 of file qgraphicsgridlayout.cpp.

References d.

Referenced by ~QGraphicsGridLayout().

+ Here is the caller graph for this function:

◆ horizontalSpacing()

qreal QGraphicsGridLayout::horizontalSpacing ( ) const

Returns the default horizontal spacing for the grid layout.

Definition at line 168 of file qgraphicsgridlayout.cpp.

References d, and Qt::Horizontal.

◆ invalidate()

void QGraphicsGridLayout::invalidate ( )
overridevirtual

\reimp

Reimplemented from QGraphicsLayout.

Definition at line 585 of file qgraphicsgridlayout.cpp.

References d, and QGraphicsLayout::invalidate().

Referenced by addItem(), removeAt(), setAlignment(), setColumnAlignment(), setColumnFixedWidth(), setColumnMaximumWidth(), setColumnMinimumWidth(), setColumnPreferredWidth(), setColumnSpacing(), setColumnStretchFactor(), setHorizontalSpacing(), setRowAlignment(), setRowFixedHeight(), setRowMaximumHeight(), setRowMinimumHeight(), setRowPreferredHeight(), setRowSpacing(), setRowStretchFactor(), setSpacing(), and setVerticalSpacing().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ itemAt() [1/2]

QGraphicsLayoutItem * QGraphicsGridLayout::itemAt ( int index) const
overridevirtual

Returns the layout item at index, or \nullptr if there is no layout item at this index.

Implements QGraphicsLayout.

Definition at line 525 of file qgraphicsgridlayout.cpp.

References d, and qWarning.

◆ itemAt() [2/2]

QGraphicsLayoutItem * QGraphicsGridLayout::itemAt ( int row,
int column ) const

Returns a pointer to the layout item at (row, column).

Definition at line 500 of file qgraphicsgridlayout.cpp.

References columnCount(), d, qWarning, and rowCount().

Referenced by ~QGraphicsGridLayout().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeAt()

void QGraphicsGridLayout::removeAt ( int index)
overridevirtual

Removes the layout item at index without destroying it.

Ownership of the item is transferred to the caller.

See also
addItem()

Implements QGraphicsLayout.

Definition at line 543 of file qgraphicsgridlayout.cpp.

References d, Qt::Horizontal, invalidate(), layoutItem(), qWarning, and Qt::Vertical.

Referenced by ~QGraphicsGridLayout(), and removeItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeItem()

void QGraphicsGridLayout::removeItem ( QGraphicsLayoutItem * item)

Removes the layout item item without destroying it.

Ownership of the item is transferred to the caller.

See also
addItem()

Definition at line 576 of file qgraphicsgridlayout.cpp.

References d, item, and removeAt().

+ Here is the call graph for this function:

◆ rowAlignment()

Qt::Alignment QGraphicsGridLayout::rowAlignment ( int row) const

Returns the alignment of row.

Definition at line 431 of file qgraphicsgridlayout.cpp.

References d, and Qt::Vertical.

◆ rowCount()

int QGraphicsGridLayout::rowCount ( ) const

Returns the number of rows in the grid layout.

This is always one more than the index of the last row that is occupied by a layout item (empty rows are counted except for those at the end).

Definition at line 480 of file qgraphicsgridlayout.cpp.

References d, and Qt::Vertical.

Referenced by itemAt().

+ Here is the caller graph for this function:

◆ rowMaximumHeight()

qreal QGraphicsGridLayout::rowMaximumHeight ( int row) const

Returns the maximum height for row, row.

Definition at line 333 of file qgraphicsgridlayout.cpp.

References d, Qt::MaximumSize, and Qt::Vertical.

◆ rowMinimumHeight()

qreal QGraphicsGridLayout::rowMinimumHeight ( int row) const

Returns the minimum height for row, row.

Definition at line 295 of file qgraphicsgridlayout.cpp.

References d, Qt::MinimumSize, and Qt::Vertical.

◆ rowPreferredHeight()

qreal QGraphicsGridLayout::rowPreferredHeight ( int row) const

Returns the preferred height for row, row.

Definition at line 314 of file qgraphicsgridlayout.cpp.

References d, Qt::PreferredSize, and Qt::Vertical.

◆ rowSpacing()

qreal QGraphicsGridLayout::rowSpacing ( int row) const

Returns the row spacing for row.

Definition at line 219 of file qgraphicsgridlayout.cpp.

References d, and Qt::Vertical.

◆ rowStretchFactor()

int QGraphicsGridLayout::rowStretchFactor ( int row) const

Returns the stretch factor for row.

Definition at line 257 of file qgraphicsgridlayout.cpp.

References d, and Qt::Vertical.

◆ setAlignment()

void QGraphicsGridLayout::setAlignment ( QGraphicsLayoutItem * item,
Qt::Alignment alignment )

Sets the alignment for item to alignment.

Definition at line 459 of file qgraphicsgridlayout.cpp.

References alignment, d, invalidate(), and item.

+ Here is the call graph for this function:

◆ setColumnAlignment()

void QGraphicsGridLayout::setColumnAlignment ( int column,
Qt::Alignment alignment )

Sets the alignment for column to alignment.

Definition at line 440 of file qgraphicsgridlayout.cpp.

References alignment, d, Qt::Horizontal, and invalidate().

+ Here is the call graph for this function:

◆ setColumnFixedWidth()

void QGraphicsGridLayout::setColumnFixedWidth ( int column,
qreal width )

Sets the fixed width of column to width.

Definition at line 410 of file qgraphicsgridlayout.cpp.

References d, Qt::Horizontal, invalidate(), Qt::MaximumSize, and Qt::MinimumSize.

+ Here is the call graph for this function:

◆ setColumnMaximumWidth()

void QGraphicsGridLayout::setColumnMaximumWidth ( int column,
qreal width )

Sets the maximum width of column to width.

Definition at line 391 of file qgraphicsgridlayout.cpp.

References d, Qt::Horizontal, invalidate(), and Qt::MaximumSize.

+ Here is the call graph for this function:

◆ setColumnMinimumWidth()

void QGraphicsGridLayout::setColumnMinimumWidth ( int column,
qreal width )

Sets the minimum width for column to width.

Definition at line 353 of file qgraphicsgridlayout.cpp.

References d, Qt::Horizontal, invalidate(), and Qt::MinimumSize.

+ Here is the call graph for this function:

◆ setColumnPreferredWidth()

void QGraphicsGridLayout::setColumnPreferredWidth ( int column,
qreal width )

Sets the preferred width for column to width.

Definition at line 372 of file qgraphicsgridlayout.cpp.

References d, Qt::Horizontal, invalidate(), and Qt::PreferredSize.

+ Here is the call graph for this function:

◆ setColumnSpacing()

void QGraphicsGridLayout::setColumnSpacing ( int column,
qreal spacing )

Sets the spacing for column to spacing.

Definition at line 228 of file qgraphicsgridlayout.cpp.

References d, Qt::Horizontal, invalidate(), and spacing.

+ Here is the call graph for this function:

◆ setColumnStretchFactor()

void QGraphicsGridLayout::setColumnStretchFactor ( int column,
int stretch )

Sets the stretch factor for column to stretch.

Definition at line 266 of file qgraphicsgridlayout.cpp.

References d, Qt::Horizontal, and invalidate().

+ Here is the call graph for this function:

◆ setGeometry()

void QGraphicsGridLayout::setGeometry ( const QRectF & rect)
overridevirtual

Sets the bounding geometry of the grid layout to rect.

Reimplemented from QGraphicsLayoutItem.

Definition at line 606 of file qgraphicsgridlayout.cpp.

References d, QGraphicsLayoutItem::geometry(), QGraphicsLayout::getContentsMargins(), qDebug, qSwap(), rect, Qt::RightToLeft, and QGraphicsLayoutItem::setGeometry().

+ Here is the call graph for this function:

◆ setHorizontalSpacing()

void QGraphicsGridLayout::setHorizontalSpacing ( qreal spacing)

Sets the default horizontal spacing for the grid layout to spacing.

Definition at line 158 of file qgraphicsgridlayout.cpp.

References d, Qt::Horizontal, invalidate(), and spacing.

+ Here is the call graph for this function:

◆ setRowAlignment()

void QGraphicsGridLayout::setRowAlignment ( int row,
Qt::Alignment alignment )

Sets the alignment of row to alignment.

Definition at line 421 of file qgraphicsgridlayout.cpp.

References alignment, d, invalidate(), and Qt::Vertical.

+ Here is the call graph for this function:

◆ setRowFixedHeight()

void QGraphicsGridLayout::setRowFixedHeight ( int row,
qreal height )

Sets the fixed height for row, row, to height.

Definition at line 342 of file qgraphicsgridlayout.cpp.

References d, invalidate(), Qt::MaximumSize, Qt::MinimumSize, and Qt::Vertical.

+ Here is the call graph for this function:

◆ setRowMaximumHeight()

void QGraphicsGridLayout::setRowMaximumHeight ( int row,
qreal height )

Sets the maximum height for row, row, to height.

Definition at line 323 of file qgraphicsgridlayout.cpp.

References d, invalidate(), Qt::MaximumSize, and Qt::Vertical.

+ Here is the call graph for this function:

◆ setRowMinimumHeight()

void QGraphicsGridLayout::setRowMinimumHeight ( int row,
qreal height )

Sets the minimum height for row, row, to height.

Definition at line 285 of file qgraphicsgridlayout.cpp.

References d, invalidate(), Qt::MinimumSize, and Qt::Vertical.

+ Here is the call graph for this function:

◆ setRowPreferredHeight()

void QGraphicsGridLayout::setRowPreferredHeight ( int row,
qreal height )

Sets the preferred height for row, row, to height.

Definition at line 304 of file qgraphicsgridlayout.cpp.

References d, invalidate(), Qt::PreferredSize, and Qt::Vertical.

+ Here is the call graph for this function:

◆ setRowSpacing()

void QGraphicsGridLayout::setRowSpacing ( int row,
qreal spacing )

Sets the spacing for row to spacing.

Definition at line 209 of file qgraphicsgridlayout.cpp.

References d, invalidate(), spacing, and Qt::Vertical.

+ Here is the call graph for this function:

◆ setRowStretchFactor()

void QGraphicsGridLayout::setRowStretchFactor ( int row,
int stretch )

Sets the stretch factor for row to stretch.

Definition at line 247 of file qgraphicsgridlayout.cpp.

References d, invalidate(), and Qt::Vertical.

+ Here is the call graph for this function:

◆ setSpacing()

void QGraphicsGridLayout::setSpacing ( qreal spacing)

Sets the grid layout's default spacing, both vertical and horizontal, to spacing.

See also
rowSpacing(), columnSpacing()

Definition at line 199 of file qgraphicsgridlayout.cpp.

References d, Qt::Horizontal, invalidate(), spacing, and Qt::Vertical.

+ Here is the call graph for this function:

◆ setVerticalSpacing()

void QGraphicsGridLayout::setVerticalSpacing ( qreal spacing)

Sets the default vertical spacing for the grid layout to spacing.

Definition at line 177 of file qgraphicsgridlayout.cpp.

References d, invalidate(), spacing, and Qt::Vertical.

+ Here is the call graph for this function:

◆ sizeHint()

QSizeF QGraphicsGridLayout::sizeHint ( Qt::SizeHint which,
const QSizeF & constraint = QSizeF() ) const
overridevirtual

\reimp

Implements QGraphicsLayoutItem.

Definition at line 632 of file qgraphicsgridlayout.cpp.

References d, and QGraphicsLayout::getContentsMargins().

+ Here is the call graph for this function:

◆ verticalSpacing()

qreal QGraphicsGridLayout::verticalSpacing ( ) const

Returns the default vertical spacing for the grid layout.

Definition at line 187 of file qgraphicsgridlayout.cpp.

References d, and Qt::Vertical.


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