API reference - Class QGraphicsLayoutItem

Notation used in Ruby API documentation

Module: QtWidgets

Description: Binding of QGraphicsLayoutItem

Class hierarchy: QGraphicsLayoutItem

Public constructors

new QGraphicsLayoutItemnew(QGraphicsLayoutItem ptr parent = nullptr,
bool isLayout = false)
Constructor QGraphicsLayoutItem::QGraphicsLayoutItem(QGraphicsLayoutItem *parent, bool isLayout)

Public methods

void_createEnsures the C++ object is created
void_destroyExplicitly destroys the object
[const]bool_destroyed?Returns a value indicating whether the object was already destroyed
[const]bool_is_const_object?Returns a value indicating whether the reference is a const reference
void_manageMarks the object as managed by the script side.
void_unmanageMarks the object as no longer owned by the script side.
[const]QRectFcontentsRectMethod QRectF QGraphicsLayoutItem::contentsRect()
[const]QSizeFeffectiveSizeHint(const Qt_SizeHint which,
const QSizeF constraint = QSizeF())
Method QSizeF QGraphicsLayoutItem::effectiveSizeHint(Qt::SizeHint which, const QSizeF &constraint)
[const]QRectFgeometryMethod QRectF QGraphicsLayoutItem::geometry()
voidgeometry=(const QRectF rect)Method void QGraphicsLayoutItem::setGeometry(const QRectF &rect)
[const]voidgetContentsMargins(double ptr left,
double ptr top,
double ptr right,
double ptr bottom)
Virtual method void QGraphicsLayoutItem::getContentsMargins(double *left, double *top, double *right, double *bottom)
[const]QGraphicsItem ptrgraphicsItemMethod QGraphicsItem *QGraphicsLayoutItem::graphicsItem()
[const]boolisLayout?Method bool QGraphicsLayoutItem::isLayout()
[const]doublemaximumHeightMethod double QGraphicsLayoutItem::maximumHeight()
voidmaximumHeight=(double height)Method void QGraphicsLayoutItem::setMaximumHeight(double height)
[const]QSizeFmaximumSizeMethod QSizeF QGraphicsLayoutItem::maximumSize()
voidmaximumSize=(const QSizeF size)Method void QGraphicsLayoutItem::setMaximumSize(const QSizeF &size)
[const]doublemaximumWidthMethod double QGraphicsLayoutItem::maximumWidth()
voidmaximumWidth=(double width)Method void QGraphicsLayoutItem::setMaximumWidth(double width)
[const]doubleminimumHeightMethod double QGraphicsLayoutItem::minimumHeight()
voidminimumHeight=(double height)Method void QGraphicsLayoutItem::setMinimumHeight(double height)
[const]QSizeFminimumSizeMethod QSizeF QGraphicsLayoutItem::minimumSize()
voidminimumSize=(const QSizeF size)Method void QGraphicsLayoutItem::setMinimumSize(const QSizeF &size)
[const]doubleminimumWidthMethod double QGraphicsLayoutItem::minimumWidth()
voidminimumWidth=(double width)Method void QGraphicsLayoutItem::setMinimumWidth(double width)
[const]boolownedByLayoutMethod bool QGraphicsLayoutItem::ownedByLayout()
[const]QGraphicsLayoutItem ptrparentLayoutItemMethod QGraphicsLayoutItem *QGraphicsLayoutItem::parentLayoutItem()
voidparentLayoutItem=(QGraphicsLayoutItem ptr parent)Method void QGraphicsLayoutItem::setParentLayoutItem(QGraphicsLayoutItem *parent)
[const]doublepreferredHeightMethod double QGraphicsLayoutItem::preferredHeight()
voidpreferredHeight=(double height)Method void QGraphicsLayoutItem::setPreferredHeight(double height)
[const]QSizeFpreferredSizeMethod QSizeF QGraphicsLayoutItem::preferredSize()
voidpreferredSize=(const QSizeF size)Method void QGraphicsLayoutItem::setPreferredSize(const QSizeF &size)
[const]doublepreferredWidthMethod double QGraphicsLayoutItem::preferredWidth()
voidpreferredWidth=(double width)Method void QGraphicsLayoutItem::setPreferredWidth(double width)
voidsetGeometry(const QRectF rect)Virtual method void QGraphicsLayoutItem::setGeometry(const QRectF &rect)
voidsetMaximumHeight(double height)Method void QGraphicsLayoutItem::setMaximumHeight(double height)
voidsetMaximumSize(const QSizeF size)Method void QGraphicsLayoutItem::setMaximumSize(const QSizeF &size)
voidsetMaximumSize(double w,
double h)
Method void QGraphicsLayoutItem::setMaximumSize(double w, double h)
voidsetMaximumWidth(double width)Method void QGraphicsLayoutItem::setMaximumWidth(double width)
voidsetMinimumHeight(double height)Method void QGraphicsLayoutItem::setMinimumHeight(double height)
voidsetMinimumSize(const QSizeF size)Method void QGraphicsLayoutItem::setMinimumSize(const QSizeF &size)
voidsetMinimumSize(double w,
double h)
Method void QGraphicsLayoutItem::setMinimumSize(double w, double h)
voidsetMinimumWidth(double width)Method void QGraphicsLayoutItem::setMinimumWidth(double width)
voidsetParentLayoutItem(QGraphicsLayoutItem ptr parent)Method void QGraphicsLayoutItem::setParentLayoutItem(QGraphicsLayoutItem *parent)
voidsetPreferredHeight(double height)Method void QGraphicsLayoutItem::setPreferredHeight(double height)
voidsetPreferredSize(const QSizeF size)Method void QGraphicsLayoutItem::setPreferredSize(const QSizeF &size)
voidsetPreferredSize(double w,
double h)
Method void QGraphicsLayoutItem::setPreferredSize(double w, double h)
voidsetPreferredWidth(double width)Method void QGraphicsLayoutItem::setPreferredWidth(double width)
voidsetSizePolicy(const QSizePolicy policy)Method void QGraphicsLayoutItem::setSizePolicy(const QSizePolicy &policy)
voidsetSizePolicy(const QSizePolicy_Policy hPolicy,
const QSizePolicy_Policy vPolicy,
const QSizePolicy_ControlType controlType = QSizePolicy::DefaultType)
Method void QGraphicsLayoutItem::setSizePolicy(QSizePolicy::Policy hPolicy, QSizePolicy::Policy vPolicy, QSizePolicy::ControlType controlType)
[const]QSizePolicysizePolicyMethod QSizePolicy QGraphicsLayoutItem::sizePolicy()
voidsizePolicy=(const QSizePolicy policy)Method void QGraphicsLayoutItem::setSizePolicy(const QSizePolicy &policy)
voidupdateGeometryVirtual method void QGraphicsLayoutItem::updateGeometry()

Protected methods (static, non-static and constructors)

voidsetGraphicsItem(QGraphicsItem ptr item)Method void QGraphicsLayoutItem::setGraphicsItem(QGraphicsItem *item)
voidsetOwnedByLayout(bool ownedByLayout)Method void QGraphicsLayoutItem::setOwnedByLayout(bool ownedByLayout)
[const]QSizeFsizeHint(const Qt_SizeHint which,
const QSizeF constraint)
Virtual method QSizeF QGraphicsLayoutItem::sizeHint(Qt::SizeHint which, const QSizeF &constraint)

Deprecated methods (protected, public, static, non-static and constructors)

voidcreateUse of this method is deprecated. Use _create instead
voiddestroyUse of this method is deprecated. Use _destroy instead
[const]booldestroyed?Use of this method is deprecated. Use _destroyed? instead
[const]boolis_const_object?Use of this method is deprecated. Use _is_const_object? instead

Detailed description

_create

Signature: void _create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

_destroy

Signature: void _destroy

Description: Explicitly destroys the object

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

_destroyed?

Signature: [const] bool _destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

_is_const_object?

Signature: [const] bool _is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

_manage

Signature: void _manage

Description: Marks the object as managed by the script side.

After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required.

Usually it's not required to call this method. It has been introduced in version 0.24.

_unmanage

Signature: void _unmanage

Description: Marks the object as no longer owned by the script side.

Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur.

Usually it's not required to call this method. It has been introduced in version 0.24.

contentsRect

Signature: [const] QRectF contentsRect

Description: Method QRectF QGraphicsLayoutItem::contentsRect()

create

Signature: void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

destroy

Signature: void destroy

Description: Explicitly destroys the object

Use of this method is deprecated. Use _destroy instead

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

destroyed?

Signature: [const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

Use of this method is deprecated. Use _destroyed? instead

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

effectiveSizeHint

Signature: [const] QSizeF effectiveSizeHint (const Qt_SizeHint which, const QSizeF constraint = QSizeF())

Description: Method QSizeF QGraphicsLayoutItem::effectiveSizeHint(Qt::SizeHint which, const QSizeF &constraint)

geometry

Signature: [const] QRectF geometry

Description: Method QRectF QGraphicsLayoutItem::geometry()

Python specific notes:
The object exposes a readable attribute 'geometry'. This is the getter.
The object exposes a readable attribute 'geometry'. This is the getter.
The object exposes a readable attribute 'geometry'. This is the getter.
The object exposes a readable attribute 'geometry'. This is the getter.

geometry=

Signature: void geometry= (const QRectF rect)

Description: Method void QGraphicsLayoutItem::setGeometry(const QRectF &rect)

Python specific notes:
The object exposes a writable attribute 'geometry'. This is the setter.

getContentsMargins

Signature: [const] void getContentsMargins (double ptr left, double ptr top, double ptr right, double ptr bottom)

Description: Virtual method void QGraphicsLayoutItem::getContentsMargins(double *left, double *top, double *right, double *bottom)

This method can be reimplemented in a derived class.

graphicsItem

Signature: [const] QGraphicsItem ptr graphicsItem

Description: Method QGraphicsItem *QGraphicsLayoutItem::graphicsItem()

isLayout?

Signature: [const] bool isLayout?

Description: Method bool QGraphicsLayoutItem::isLayout()

is_const_object?

Signature: [const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

Use of this method is deprecated. Use _is_const_object? instead

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

maximumHeight

Signature: [const] double maximumHeight

Description: Method double QGraphicsLayoutItem::maximumHeight()

Python specific notes:
The object exposes a readable attribute 'maximumHeight'. This is the getter.

maximumHeight=

Signature: void maximumHeight= (double height)

Description: Method void QGraphicsLayoutItem::setMaximumHeight(double height)

Python specific notes:
The object exposes a writable attribute 'maximumHeight'. This is the setter.

maximumSize

Signature: [const] QSizeF maximumSize

Description: Method QSizeF QGraphicsLayoutItem::maximumSize()

Python specific notes:
The object exposes a readable attribute 'maximumSize'. This is the getter.

maximumSize=

Signature: void maximumSize= (const QSizeF size)

Description: Method void QGraphicsLayoutItem::setMaximumSize(const QSizeF &size)

Python specific notes:
The object exposes a writable attribute 'maximumSize'. This is the setter.

maximumWidth

Signature: [const] double maximumWidth

Description: Method double QGraphicsLayoutItem::maximumWidth()

Python specific notes:
The object exposes a readable attribute 'maximumWidth'. This is the getter.

maximumWidth=

Signature: void maximumWidth= (double width)

Description: Method void QGraphicsLayoutItem::setMaximumWidth(double width)

Python specific notes:
The object exposes a writable attribute 'maximumWidth'. This is the setter.

minimumHeight

Signature: [const] double minimumHeight

Description: Method double QGraphicsLayoutItem::minimumHeight()

Python specific notes:
The object exposes a readable attribute 'minimumHeight'. This is the getter.

minimumHeight=

Signature: void minimumHeight= (double height)

Description: Method void QGraphicsLayoutItem::setMinimumHeight(double height)

Python specific notes:
The object exposes a writable attribute 'minimumHeight'. This is the setter.

minimumSize

Signature: [const] QSizeF minimumSize

Description: Method QSizeF QGraphicsLayoutItem::minimumSize()

Python specific notes:
The object exposes a readable attribute 'minimumSize'. This is the getter.

minimumSize=

Signature: void minimumSize= (const QSizeF size)

Description: Method void QGraphicsLayoutItem::setMinimumSize(const QSizeF &size)

Python specific notes:
The object exposes a writable attribute 'minimumSize'. This is the setter.

minimumWidth

Signature: [const] double minimumWidth

Description: Method double QGraphicsLayoutItem::minimumWidth()

Python specific notes:
The object exposes a readable attribute 'minimumWidth'. This is the getter.

minimumWidth=

Signature: void minimumWidth= (double width)

Description: Method void QGraphicsLayoutItem::setMinimumWidth(double width)

Python specific notes:
The object exposes a writable attribute 'minimumWidth'. This is the setter.

new

Signature: [static] new QGraphicsLayoutItem new (QGraphicsLayoutItem ptr parent = nullptr, bool isLayout = false)

Description: Constructor QGraphicsLayoutItem::QGraphicsLayoutItem(QGraphicsLayoutItem *parent, bool isLayout)

This method creates an object of class QGraphicsLayoutItem.

Python specific notes:
This method is the default initializer of the object.

ownedByLayout

Signature: [const] bool ownedByLayout

Description: Method bool QGraphicsLayoutItem::ownedByLayout()

parentLayoutItem

Signature: [const] QGraphicsLayoutItem ptr parentLayoutItem

Description: Method QGraphicsLayoutItem *QGraphicsLayoutItem::parentLayoutItem()

Python specific notes:
The object exposes a readable attribute 'parentLayoutItem'. This is the getter.

parentLayoutItem=

Signature: void parentLayoutItem= (QGraphicsLayoutItem ptr parent)

Description: Method void QGraphicsLayoutItem::setParentLayoutItem(QGraphicsLayoutItem *parent)

Python specific notes:
The object exposes a writable attribute 'parentLayoutItem'. This is the setter.

preferredHeight

Signature: [const] double preferredHeight

Description: Method double QGraphicsLayoutItem::preferredHeight()

Python specific notes:
The object exposes a readable attribute 'preferredHeight'. This is the getter.

preferredHeight=

Signature: void preferredHeight= (double height)

Description: Method void QGraphicsLayoutItem::setPreferredHeight(double height)

Python specific notes:
The object exposes a writable attribute 'preferredHeight'. This is the setter.

preferredSize

Signature: [const] QSizeF preferredSize

Description: Method QSizeF QGraphicsLayoutItem::preferredSize()

Python specific notes:
The object exposes a readable attribute 'preferredSize'. This is the getter.

preferredSize=

Signature: void preferredSize= (const QSizeF size)

Description: Method void QGraphicsLayoutItem::setPreferredSize(const QSizeF &size)

Python specific notes:
The object exposes a writable attribute 'preferredSize'. This is the setter.

preferredWidth

Signature: [const] double preferredWidth

Description: Method double QGraphicsLayoutItem::preferredWidth()

Python specific notes:
The object exposes a readable attribute 'preferredWidth'. This is the getter.

preferredWidth=

Signature: void preferredWidth= (double width)

Description: Method void QGraphicsLayoutItem::setPreferredWidth(double width)

Python specific notes:
The object exposes a writable attribute 'preferredWidth'. This is the setter.

setGeometry

Signature: void setGeometry (const QRectF rect)

Description: Virtual method void QGraphicsLayoutItem::setGeometry(const QRectF &rect)

This method can be reimplemented in a derived class.

setGraphicsItem

Signature: void setGraphicsItem (QGraphicsItem ptr item)

Description: Method void QGraphicsLayoutItem::setGraphicsItem(QGraphicsItem *item)

This method is protected and can only be called from inside a derived class.

setMaximumHeight

Signature: void setMaximumHeight (double height)

Description: Method void QGraphicsLayoutItem::setMaximumHeight(double height)

Python specific notes:
The object exposes a writable attribute 'maximumHeight'. This is the setter.

setMaximumSize

(1) Signature: void setMaximumSize (const QSizeF size)

Description: Method void QGraphicsLayoutItem::setMaximumSize(const QSizeF &size)

Python specific notes:
The object exposes a writable attribute 'maximumSize'. This is the setter.

(2) Signature: void setMaximumSize (double w, double h)

Description: Method void QGraphicsLayoutItem::setMaximumSize(double w, double h)

setMaximumWidth

Signature: void setMaximumWidth (double width)

Description: Method void QGraphicsLayoutItem::setMaximumWidth(double width)

Python specific notes:
The object exposes a writable attribute 'maximumWidth'. This is the setter.

setMinimumHeight

Signature: void setMinimumHeight (double height)

Description: Method void QGraphicsLayoutItem::setMinimumHeight(double height)

Python specific notes:
The object exposes a writable attribute 'minimumHeight'. This is the setter.

setMinimumSize

(1) Signature: void setMinimumSize (const QSizeF size)

Description: Method void QGraphicsLayoutItem::setMinimumSize(const QSizeF &size)

Python specific notes:
The object exposes a writable attribute 'minimumSize'. This is the setter.

(2) Signature: void setMinimumSize (double w, double h)

Description: Method void QGraphicsLayoutItem::setMinimumSize(double w, double h)

setMinimumWidth

Signature: void setMinimumWidth (double width)

Description: Method void QGraphicsLayoutItem::setMinimumWidth(double width)

Python specific notes:
The object exposes a writable attribute 'minimumWidth'. This is the setter.

setOwnedByLayout

Signature: void setOwnedByLayout (bool ownedByLayout)

Description: Method void QGraphicsLayoutItem::setOwnedByLayout(bool ownedByLayout)

This method is protected and can only be called from inside a derived class.

setParentLayoutItem

Signature: void setParentLayoutItem (QGraphicsLayoutItem ptr parent)

Description: Method void QGraphicsLayoutItem::setParentLayoutItem(QGraphicsLayoutItem *parent)

Python specific notes:
The object exposes a writable attribute 'parentLayoutItem'. This is the setter.

setPreferredHeight

Signature: void setPreferredHeight (double height)

Description: Method void QGraphicsLayoutItem::setPreferredHeight(double height)

Python specific notes:
The object exposes a writable attribute 'preferredHeight'. This is the setter.

setPreferredSize

(1) Signature: void setPreferredSize (const QSizeF size)

Description: Method void QGraphicsLayoutItem::setPreferredSize(const QSizeF &size)

Python specific notes:
The object exposes a writable attribute 'preferredSize'. This is the setter.

(2) Signature: void setPreferredSize (double w, double h)

Description: Method void QGraphicsLayoutItem::setPreferredSize(double w, double h)

setPreferredWidth

Signature: void setPreferredWidth (double width)

Description: Method void QGraphicsLayoutItem::setPreferredWidth(double width)

Python specific notes:
The object exposes a writable attribute 'preferredWidth'. This is the setter.

setSizePolicy

(1) Signature: void setSizePolicy (const QSizePolicy policy)

Description: Method void QGraphicsLayoutItem::setSizePolicy(const QSizePolicy &policy)

Python specific notes:
The object exposes a writable attribute 'sizePolicy'. This is the setter.

(2) Signature: void setSizePolicy (const QSizePolicy_Policy hPolicy, const QSizePolicy_Policy vPolicy, const QSizePolicy_ControlType controlType = QSizePolicy::DefaultType)

Description: Method void QGraphicsLayoutItem::setSizePolicy(QSizePolicy::Policy hPolicy, QSizePolicy::Policy vPolicy, QSizePolicy::ControlType controlType)

sizeHint

Signature: [const] QSizeF sizeHint (const Qt_SizeHint which, const QSizeF constraint)

Description: Virtual method QSizeF QGraphicsLayoutItem::sizeHint(Qt::SizeHint which, const QSizeF &constraint)

This method can be reimplemented in a derived class.

sizePolicy

Signature: [const] QSizePolicy sizePolicy

Description: Method QSizePolicy QGraphicsLayoutItem::sizePolicy()

Python specific notes:
The object exposes a readable attribute 'sizePolicy'. This is the getter.

sizePolicy=

Signature: void sizePolicy= (const QSizePolicy policy)

Description: Method void QGraphicsLayoutItem::setSizePolicy(const QSizePolicy &policy)

Python specific notes:
The object exposes a writable attribute 'sizePolicy'. This is the setter.

updateGeometry

Signature: void updateGeometry

Description: Virtual method void QGraphicsLayoutItem::updateGeometry()

This method can be reimplemented in a derived class.