CopperSpice API  1.7.4
QWidgetItem Class Reference

The QWidgetItem class is a layout item that represents a widget. More...

Inheritance diagram for QWidgetItem:
QLayoutItem

Public Methods

 QWidgetItem (QWidget *widget)
 
QSizePolicy::ControlTypes controlTypes () const override
 
Qt::Orientations expandingDirections () const override
 
QRect geometry () const override
 
bool hasHeightForWidth () const override
 
int heightForWidth (int width) const override
 
bool isEmpty () const override
 
QSize maximumSize () const override
 
QSize minimumSize () const override
 
void setGeometry (const QRect &rect) override
 
QSize sizeHint () const override
 
virtual QWidgetwidget () override
 
- Public Methods inherited from QLayoutItem
 QLayoutItem (Qt::Alignment alignment=Qt::Alignment ())
 
virtual ~QLayoutItem ()
 
Qt::Alignment alignment () const
 
virtual void invalidate ()
 
virtual QLayoutlayout ()
 
virtual int minimumHeightForWidth (int width) const
 
void setAlignment (Qt::Alignment alignment)
 
virtual QSpacerItemspacerItem ()
 

Detailed Description

The QWidgetItem class is a layout item that represents a widget.

Normally, you do not need to use this class directly. the CopperSpice built-in layout managers provide the following functions for manipulating widgets in layouts.

ClassMethods
QBoxLayout addWidget(), insertWidget(), setStretchFactor()
QGridLayout addWidget()
QStackedLayout addWidget(), insertWidget(), currentWidget(), setCurrentWidget(), widget()
See also
QLayout, QSpacerItem, QLayoutItem::widget()

Constructor & Destructor Documentation

QWidgetItem::QWidgetItem ( QWidget widget)
inlineexplicit

Creates an item containing the given widget.

Method Documentation

QSizePolicy::ControlTypes QWidgetItem::controlTypes ( ) const
overridevirtual

Returns the control type(s) for the layout item. For a QWidgetItem, the control type comes from the widget's size policy; for a QLayoutItem, the control types is derived from the layout's contents.

See also
QSizePolicy::controlType()

Reimplemented from QLayoutItem::controlTypes()

Qt::Orientations QWidgetItem::expandingDirections ( ) const
overridevirtual
QRect QWidgetItem::geometry ( ) const
overridevirtual
bool QWidgetItem::hasHeightForWidth ( ) const
overridevirtual
int QWidgetItem::heightForWidth ( int  width) const
overridevirtual

Reimplemented from QLayoutItem::heightForWidth()

bool QWidgetItem::isEmpty ( ) const
overridevirtual

Returns true if the widget is hidden, otherwise returns false.

See also
QWidget::isHidden()

Implements QLayoutItem::isEmpty()

QSize QWidgetItem::maximumSize ( ) const
overridevirtual
QSize QWidgetItem::minimumSize ( ) const
overridevirtual
void QWidgetItem::setGeometry ( const QRect rect)
overridevirtual
QSize QWidgetItem::sizeHint ( ) const
overridevirtual
QWidget * QWidgetItem::widget ( )
overridevirtual

Returns the widget managed by this item.

Reimplemented from QLayoutItem::widget()