<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # QBoxLayout Class Reference ## [[QtGui](index.htm) module] 該QBoxLayout班線達子部件水平或垂直。[More...](#details) 繼承[QLayout](qlayout.html)。 通過繼承[QHBoxLayout](qhboxlayout.html)和[QVBoxLayout](qvboxlayout.html)。 ### Types * `enum Direction { LeftToRight, RightToLeft, TopToBottom, BottomToTop, Down, Up }` ### Methods * `__init__ (self, Direction?direction, QWidget?parent?=?None)` * `addItem (self, QLayoutItem)` * `addLayout (self, QLayout?layout, int?stretch?=?0)` * `addSpacerItem (self, QSpacerItem?spacerItem)` * `addSpacing (self, int?size)` * `addStretch (self, int?stretch?=?0)` * `addStrut (self, int)` * `addWidget (self, QWidget, int?stretch?=?0, Qt.Alignment?alignment?=?0)` * `int count (self)` * `Direction direction (self)` * `Qt.Orientations expandingDirections (self)` * `bool hasHeightForWidth (self)` * `int heightForWidth (self, int)` * `insertItem (self, int?index, QLayoutItem)` * `insertLayout (self, int?index, QLayout?layout, int?stretch?=?0)` * `insertSpacerItem (self, int?index, QSpacerItem?spacerItem)` * `insertSpacing (self, int?index, int?size)` * `insertStretch (self, int?index, int?stretch?=?0)` * `insertWidget (self, int?index, QWidget?widget, int?stretch?=?0, Qt.Alignment?alignment?=?0)` * `invalidate (self)` * `QLayoutItem itemAt (self, int)` * `QSize maximumSize (self)` * `int minimumHeightForWidth (self, int)` * `QSize minimumSize (self)` * `setDirection (self, Direction)` * `setGeometry (self, QRect)` * `setSpacing (self, int?spacing)` * `setStretch (self, int?index, int?stretch)` * `bool setStretchFactor (self, QWidget?w, int?stretch)` * `bool setStretchFactor (self, QLayout?l, int?stretch)` * `QSize sizeHint (self)` * `int spacing (self)` * `int stretch (self, int?index)` * `QLayoutItem takeAt (self, int)` * * * ## Detailed Description 該QBoxLayout班線達子部件水平或垂直。 QBoxLayout佔用空間它得到(從其父布局或從[parentWidget](qlayout.html#parentWidget)( ) ) ,將其劃分成一排箱子,并使得每個管理部件填補一個盒子。 ![Horizontal box layout with five child widgets](https://img.kancloud.cn/82/88/8288f0758cdd11f877c02dc583377c63_437x44.png) 如果QBoxLayout的方向是[Qt.Horizontal](qt.html#Orientation-enum)盒子被放置在一個行中,用合適的尺寸。每個窗口小部件(或其他框)將得到至少它的最小尺寸,并在最其最大大小。任何多馀的空間是根據拉伸??系數(更多關于下文)共享。 ![Vertical box layout with five child widgets](https://img.kancloud.cn/1a/f5/1af5ac720f4e8eb794a8a7693c07de14_97x193.png) 如果QBoxLayout的方向是[Qt.Vertical](qt.html#Orientation-enum)時,盒被放置在一個柱,再以合適的尺寸。 創建QBoxLayout最簡單的方法是使用便利的一個類,例如[QHBoxLayout](qhboxlayout.html)(為[Qt.Horizontal](qt.html#Orientation-enum)框)或[QVBoxLayout](qvboxlayout.html)(為[Qt.Vertical](qt.html#Orientation-enum)框) 。您也可以直接使用QBoxLayout構造函數,指定其方向[LeftToRight](qboxlayout.html#Direction-enum),[RightToLeft](qboxlayout.html#Direction-enum),[TopToBottom](qboxlayout.html#Direction-enum)或[BottomToTop](qboxlayout.html#Direction-enum)。 如果QBoxLayout不是頂層布局(即它不是管理所有部件的面積和兒童) ,您必須將其添加到它的父布局之前,你可以用它做任何事情。正常的方式來添加一個布局是通過調用parentLayout - \u003e[addLayout](qboxlayout.html#addLayout)( ) 。 一旦你這樣做,你可以添加盒使用四個功能之一的QBoxLayout : * [addWidget](qboxlayout.html#addWidget)() to add a widget to the QBoxLayout and set the widget's stretch factor. (The stretch factor is along the row of boxes.) * [addSpacing](qboxlayout.html#addSpacing)() to create an empty box; this is one of the functions you use to create nice and spacious dialogs. See below for ways to set margins. * [addStretch](qboxlayout.html#addStretch)() to create an empty, stretchable box. * [addLayout](qboxlayout.html#addLayout)() to add a box containing another [QLayout](qlayout.html) to the row and set that layout's stretch factor. 使用[insertWidget](qboxlayout.html#insertWidget)( )[insertSpacing](qboxlayout.html#insertSpacing)( )[insertStretch](qboxlayout.html#insertStretch)()或[insertLayout](qboxlayout.html#insertLayout)()插入一個框在布局中的指定位置。 QBoxLayout還包括兩個邊寬度: * [setContentsMargins](qlayout.html#setContentsMargins)() sets the width of the outer border on each side of the widget. This is the width of the reserved space along each of the QBoxLayout's four sides. * [setSpacing](qboxlayout.html#setSpacing)() sets the width between neighboring boxes. (You can use [addSpacing](qboxlayout.html#addSpacing)() to get more space at a particular spot.) 保證金默認是由風格提供。默認邊距最的Qt樣式指定為9子控件和11窗口。的間隔預設為相同的邊寬為頂層布局,或以相同的父布局。 從布局中刪除一個小部件,請致電[removeWidget](qlayout.html#removeWidget)( ) 。調用[QWidget.hide](qwidget.html#hide)( )上的一個小部件也有效地消除了從布局小部件,直到[QWidget.show](qwidget.html#show)()被調用。 你幾乎總是要使用[QVBoxLayout](qvboxlayout.html)和[QHBoxLayout](qhboxlayout.html)而不是QBoxLayout因為他們的方便的構造函數。 * * * ## Type Documentation ``` QBoxLayout.Direction ``` 這種類型被用來確定一個框布局的方向。 | Constant | Value | Description | | --- | --- | --- | | `QBoxLayout.LeftToRight` | `0` | 水平左向右。 | | `QBoxLayout.RightToLeft` | `1` | 由右至左的水平。 | | `QBoxLayout.TopToBottom` | `2` | 垂直從上到下。 | | `QBoxLayout.BottomToTop` | `3` | 垂直從底部到頂部。 | * * * ## Method Documentation ``` QBoxLayout.__init__ (self, Direction?direction, QWidget?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構造一個新的[QBoxLayout](qboxlayout.html)與方向_dir_與父控件_parent_。 **See also** [direction](qboxlayout.html#direction)( ) 。 ``` QBoxLayout.addItem (self, QLayoutItem) ``` 該_QLayoutItem_說法有它的所有權轉移給Qt的。 從重新實現[QLayout.addItem](qlayout.html#addItem)( ) 。 ``` QBoxLayout.addLayout (self, QLayout?layout, int?stretch?=?0) ``` 該_layout_說法有它的所有權轉移給Qt的。 添加_layout_該框,帶串口拉伸系數年底_stretch_。 **See also** [insertLayout](qboxlayout.html#insertLayout)( )[addItem](qboxlayout.html#addItem)()和[addWidget](qboxlayout.html#addWidget)( ) 。 ``` QBoxLayout.addSpacerItem (self, QSpacerItem?spacerItem) ``` 該_spacerItem_說法有它的所有權轉移給Qt的。 添加_spacerItem_對這個方塊布局結束。 此功能被引入Qt的4.4 。 **See also** [addSpacing](qboxlayout.html#addSpacing)()和[addStretch](qboxlayout.html#addStretch)( ) 。 ``` QBoxLayout.addSpacing (self, int?size) ``` 添加非伸縮性的空間(一[QSpacerItem](qspaceritem.html))與大小_size_對這個方塊布局結束。[QBoxLayout](qboxlayout.html)提供默認邊距和間距。此功能增加了額外的空間。 **See also** [insertSpacing](qboxlayout.html#insertSpacing)( )[addItem](qboxlayout.html#addItem)()和[QSpacerItem](qspaceritem.html)。 ``` QBoxLayout.addStretch (self, int?stretch?=?0) ``` 增加了拉伸空間([QSpacerItem](qspaceritem.html))與零的最小尺寸和拉伸系數_stretch_對這個方塊布局結束。 **See also** [insertStretch](qboxlayout.html#insertStretch)( )[addItem](qboxlayout.html#addItem)()和[QSpacerItem](qspaceritem.html)。 ``` QBoxLayout.addStrut (self, int) ``` 限制框的垂直尺寸,如果盒子是(例如高度[LeftToRight](qboxlayout.html#Direction-enum))為最小_size_。其他制約因素可能會增加限制。 **See also** [addItem](qboxlayout.html#addItem)( ) 。 ``` QBoxLayout.addWidget (self, QWidget, int?stretch?=?0, Qt.Alignment?alignment?=?0) ``` 該_QWidget_說法有它的所有權轉移給Qt的。 添加_widget_對這個盒子的布局,以舒展的因素到底_stretch_和對齊_alignment_。 只有拉伸系數適用于[direction](qboxlayout.html#direction)的[QBoxLayout](qboxlayout.html),并且是相對于另一個盒和小部件在這[QBoxLayout](qboxlayout.html)。小工具和箱子具有較高的拉伸因素變得更加。 如果拉伸系數為0,沒有其他的[QBoxLayout](qboxlayout.html)已拉伸因子大于零,該空間是根據分布式[QWidget](qwidget.html): sizePolicy是涉及到每個插件的( ) 。 該路線是由指定的_alignment_。默認的對齊是0,這意味著該插件充滿整個細胞。 **See also** [insertWidget](qboxlayout.html#insertWidget)( )[addItem](qboxlayout.html#addItem)( )[addLayout](qboxlayout.html#addLayout)( )[addStretch](qboxlayout.html#addStretch)( )[addSpacing](qboxlayout.html#addSpacing)()和[addStrut](qboxlayout.html#addStrut)( ) 。 ``` int QBoxLayout.count (self) ``` 從重新實現[QLayout.count](qlayout.html#count)( ) 。 ``` Direction QBoxLayout.direction (self) ``` [](qboxlayout.html#Direction-enum) [返回框的方向。](qboxlayout.html#Direction-enum)[addWidget](qboxlayout.html#addWidget)()和[addSpacing](qboxlayout.html#addSpacing)( )工作在這個方向,舒展舒展在這個方向。 **See also** [setDirection](qboxlayout.html#setDirection)( )[QBoxLayout.Direction](qboxlayout.html#Direction-enum),[addWidget](qboxlayout.html#addWidget)()和[addSpacing](qboxlayout.html#addSpacing)( ) 。 ``` Qt.Orientations QBoxLayout.expandingDirections (self) ``` [](index.htm) [從重新實現](index.htm)[QLayoutItem.expandingDirections](qlayoutitem.html#expandingDirections)( ) 。 ``` bool QBoxLayout.hasHeightForWidth (self) ``` 從重新實現[QLayoutItem.hasHeightForWidth](qlayoutitem.html#hasHeightForWidth)( ) 。 ``` int QBoxLayout.heightForWidth (self, int) ``` 從重新實現[QLayoutItem.heightForWidth](qlayoutitem.html#heightForWidth)( ) 。 ``` QBoxLayout.insertItem (self, int?index, QLayoutItem) ``` 該_QLayoutItem_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 Inserts _item_在進入這個位置布局框_index_。如果_index_為負,該項目是在結尾處添加。 **See also** [addItem](qboxlayout.html#addItem)( )[insertWidget](qboxlayout.html#insertWidget)( )[insertLayout](qboxlayout.html#insertLayout)( )[insertStretch](qboxlayout.html#insertStretch)()和[insertSpacing](qboxlayout.html#insertSpacing)( ) 。 ``` QBoxLayout.insertLayout (self, int?index, QLayout?layout, int?stretch?=?0) ``` 該_layout_說法有它的所有權轉移給Qt的。 Inserts _layout_在位置_index_,用拉伸系數_stretch_。如果_index_是負的,布局是在后面。 _layout_成為框布局的孩子。 **See also** [addLayout](qboxlayout.html#addLayout)()和[insertItem](qboxlayout.html#insertItem)( ) 。 ``` QBoxLayout.insertSpacerItem (self, int?index, QSpacerItem?spacerItem) ``` 該_spacerItem_說法有它的所有權轉移給Qt的。 Inserts _spacerItem_在位置_index_,零最小尺寸和拉伸因子。如果_index_為負的空間在后面。 此功能被引入Qt的4.4 。 **See also** [addSpacerItem](qboxlayout.html#addSpacerItem)( )[insertStretch](qboxlayout.html#insertStretch)()和[insertSpacing](qboxlayout.html#insertSpacing)( ) 。 ``` QBoxLayout.insertSpacing (self, int?index, int?size) ``` 插入一個非伸縮性的空間(一[QSpacerItem](qspaceritem.html))在位置_index_,大小為_size_。如果_index_為負的空間在后面。 框布局有默認邊距和間距。此功能增加了額外的空間。 **See also** [addSpacing](qboxlayout.html#addSpacing)( )[insertItem](qboxlayout.html#insertItem)()和[QSpacerItem](qspaceritem.html)。 ``` QBoxLayout.insertStretch (self, int?index, int?stretch?=?0) ``` 插入一個伸縮空間([QSpacerItem](qspaceritem.html))在位置_index_,零最小尺寸和拉伸系數_stretch_。如果_index_為負的空間在后面。 **See also** [addStretch](qboxlayout.html#addStretch)( )[insertItem](qboxlayout.html#insertItem)()和[QSpacerItem](qspaceritem.html)。 ``` QBoxLayout.insertWidget (self, int?index, QWidget?widget, int?stretch?=?0, Qt.Alignment?alignment?=?0) ``` 該_widget_說法有它的所有權轉移給Qt的。 Inserts _widget_在位置_index_,用拉伸系數_stretch_和對齊_alignment_。如果_index_是否定的,則窗口部件被加在最后。 只有拉伸系數適用于[direction](qboxlayout.html#direction)的[QBoxLayout](qboxlayout.html),并且是相對于另一個盒和小部件在這[QBoxLayout](qboxlayout.html)。小工具和箱子具有較高的拉伸因素變得更加。 如果拉伸系數為0,沒有其他的[QBoxLayout](qboxlayout.html)已拉伸因子大于零,該空間是根據分布式[QWidget](qwidget.html): sizePolicy是涉及到每個插件的( ) 。 該路線是由指定的_alignment_。默認的對齊是0,這意味著該插件充滿整個細胞。 **See also** [addWidget](qboxlayout.html#addWidget)()和[insertItem](qboxlayout.html#insertItem)( ) 。 ``` QBoxLayout.invalidate (self) ``` 從重新實現[QLayoutItem.invalidate](qlayoutitem.html#invalidate)( ) 。 復位緩存的信息。 ``` QLayoutItem QBoxLayout.itemAt (self, int) ``` [](qlayoutitem.html) [從重新實現](qlayoutitem.html)[QLayout.itemAt](qlayout.html#itemAt)( ) 。 ``` QSize QBoxLayout.maximumSize (self) ``` [](qsize.html) [從重新實現](qsize.html)[QLayoutItem.maximumSize](qlayoutitem.html#maximumSize)( ) 。 ``` int QBoxLayout.minimumHeightForWidth (self, int) ``` 從重新實現[QLayoutItem.minimumHeightForWidth](qlayoutitem.html#minimumHeightForWidth)( ) 。 ``` QSize QBoxLayout.minimumSize (self) ``` [](qsize.html) [從重新實現](qsize.html)[QLayoutItem.minimumSize](qlayoutitem.html#minimumSize)( ) 。 ``` QBoxLayout.setDirection (self, Direction) ``` 設置此布局的方向_direction_。 **See also** [direction](qboxlayout.html#direction)( ) 。 ``` QBoxLayout.setGeometry (self, QRect) ``` 從重新實現[QLayoutItem.setGeometry](qlayoutitem.html#setGeometry)( ) 。 ``` QBoxLayout.setSpacing (self, int?spacing) ``` 重新實現[QLayout.setSpacing](qlayout.html#spacing-prop)( ) 。間距屬性設置為_spacing_。 **See also** [QLayout.setSpacing](qlayout.html#spacing-prop)()和[spacing](qboxlayout.html#spacing)( ) 。 ``` QBoxLayout.setStretch (self, int?index, int?stretch) ``` 設置拉伸因子在位置_index_。至_stretch_。 此功能被引入Qt的4.5 。 **See also** [stretch](qboxlayout.html#stretch)( ) 。 ``` bool QBoxLayout.setStretchFactor (self, QWidget?w, int?stretch) ``` 設置為拉伸因子_widget_至_stretch_并返回True ,如果_widget_在這種布局(不包括子布局)被發現,否則返回False 。 **See also** [setAlignment](qlayout.html#setAlignment)( ) 。 ``` bool QBoxLayout.setStretchFactor (self, QLayout?l, int?stretch) ``` 這是一個重載函數。 設置為布局的拉伸因子_layout_至_stretch_并返回True ,如果_layout_在這種布局(不包括子布局)被發現,否則返回False 。 ``` QSize QBoxLayout.sizeHint (self) ``` [](qsize.html) [從重新實現](qsize.html)[QLayoutItem.sizeHint](qlayoutitem.html#sizeHint)( ) 。 ``` int QBoxLayout.spacing (self) ``` 重新實現[QLayout.spacing](qlayout.html#spacing-prop)( ) 。如果spacing屬性是有效的,則返回該值。否則,對于間距屬性的值被計算并返回。由于在一個小部件的布局間距的風格有關,如果父母是一個小部件,它會查詢的樣式布局(水平或垂直)的間距。否則,父是一個布局,它會查詢父布局的間距( ) 。 **See also** [QLayout.spacing](qlayout.html#spacing-prop)()和[setSpacing](qboxlayout.html#setSpacing)( ) 。 ``` int QBoxLayout.stretch (self, int?index) ``` 返回拉伸因子在位置_index_。 此功能被引入Qt的4.5 。 **See also** [setStretch](qboxlayout.html#setStretch)( ) 。 ``` QLayoutItem QBoxLayout.takeAt (self, int) ``` [ 該_QLayoutItem_結果 ](qlayoutitem.html) [從重新實現](qlayoutitem.html)[QLayout.takeAt](qlayout.html#takeAt)( ) 。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看