Qt and respective logos are trademarks of The Qt Company Ltd.
FLOWLAYOUT API SOFTWARE
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. The default spacing for sublayouts, when the parent is a QLayout, will be determined by querying the spacing of the parent layout.Äocumentation contributions included herein are the copyrights of The default spacing for top-level layouts, when the parent is a QWidget, will be determined by querying the style. SmartSpacing() is designed to get the default spacing for either the top-level layouts or the sublayouts. Return static_cast (parent) - >spacing() Return pw - >style() - >pixelMetric(pm, nullptr, pw) Int FlowLayout ::smartSpacing( QStyle ::PixelMetric pm) const We start off by looking at the constructor: doLayout() lays out the layout items, while the smartSpacing() function calculates the spacing between them. We also declare two private methods, doLayout() and smartSpacing(). These functions add items to the layout and handle their orientation and geometry. We reimplement functions inherited from QLayout. Int smartSpacing( QStyle ::PixelMetric pm) const Int doLayout( const QRect &rect, bool testOnly) const QLayoutItem *takeAt( int index) override Void setGeometry( const QRect &rect) override QLayoutItem *itemAt( int index) const override You may check out the related API usage on the sidebar. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. Qt ::Orientations expandingDirections() const override These examples are extracted from open source projects. Void addItem( QLayoutItem *item) override
Explicit FlowLayout( QWidget *parent, int margin = - 1, int hSpacing = - 1, int vSpacing = - 1) Įxplicit FlowLayout( int margin = - 1, int hSpacing = - 1, int vSpacing = - 1)