![]() All other trademarks are property of their respective owners. Qt and respective logos are trademarks of The Qt Company Ltd. 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() 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. Return pw - >style() - >pixelMetric(pm, nullptr, pw) These examples are extracted from open source projects. ![]() 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 Qt ::Orientations expandingDirections() const override 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)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |