diff options
Diffstat (limited to 'examples/layouts/flowlayout/flowlayout.h')
-rw-r--r-- | examples/layouts/flowlayout/flowlayout.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/layouts/flowlayout/flowlayout.h b/examples/layouts/flowlayout/flowlayout.h index f864d8e..9940e55 100644 --- a/examples/layouts/flowlayout/flowlayout.h +++ b/examples/layouts/flowlayout/flowlayout.h @@ -49,11 +49,13 @@ class FlowLayout : public QLayout { public: - FlowLayout(QWidget *parent, int margin = -1, int spacing = 0); - FlowLayout(int spacing = 0); + FlowLayout(QWidget *parent, int margin = -1, int hSpacing = -1, int vSpacing = -1); + FlowLayout(int margin = -1, int hSpacing = -1, int vSpacing = -1); ~FlowLayout(); void addItem(QLayoutItem *item); + int horizontalSpacing() const; + int verticalSpacing() const; Qt::Orientations expandingDirections() const; bool hasHeightForWidth() const; int heightForWidth(int) const; @@ -66,8 +68,11 @@ public: private: int doLayout(const QRect &rect, bool testOnly) const; + int smartSpacing(QStyle::PixelMetric pm) const; QList<QLayoutItem *> itemList; + int m_hSpace; + int m_vSpace; }; #endif |