Add getter for QSizePolicy to SpacerItem
Change allows to change width and height with changeSize() method without changing size policy. Task-number: QTBUG-38518 Change-Id: I3eabb5fbfd9792c57c0a533ce14ec99b64603631 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
This commit is contained in:
parent
483328a956
commit
7c3cfdbcb7
@ -340,6 +340,14 @@ QSpacerItem * QSpacerItem::spacerItem()
|
||||
return this;
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the size policy of this item.
|
||||
*/
|
||||
QSizePolicy QSpacerItem::sizePolicy() const
|
||||
{
|
||||
return sizeP;
|
||||
}
|
||||
|
||||
/*!
|
||||
If this item is a QWidget, it is returned as a QWidget; otherwise
|
||||
0 is returned. This function provides type-safe casting.
|
||||
|
@ -102,6 +102,7 @@ public:
|
||||
void setGeometry(const QRect&);
|
||||
QRect geometry() const;
|
||||
QSpacerItem *spacerItem();
|
||||
QSizePolicy sizePolicy() const;
|
||||
|
||||
private:
|
||||
int width;
|
||||
|
Loading…
Reference in New Issue
Block a user