<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # QGridLayout Class Reference ## [[QtGui](index.htm) module] 該QGridLayout類,勾畫出一格的小部件。[More...](#details) 繼承[QLayout](qlayout.html)。 ### Methods * `__init__ (self, QWidget?parent)` * `__init__ (self)` * `addItem (self, QLayoutItem?item, int?row, int?column, int?rowSpan?=?1, int?columnSpan?=?1, Qt.Alignment?alignment?=?0)` * `addItem (self, QLayoutItem)` * `addLayout (self, QLayout, int?row, int?column, Qt.Alignment?alignment?=?0)` * `addLayout (self, QLayout, int?row, int?column, int?rowSpan, int?columnSpan, Qt.Alignment?alignment?=?0)` * `addWidget (self, QWidget?w)` * `addWidget (self, QWidget, int?row, int?column, Qt.Alignment?alignment?=?0)` * `addWidget (self, QWidget, int?row, int?column, int?rowSpan, int?columnSpan, Qt.Alignment?alignment?=?0)` * `QRect cellRect (self, int?row, int?column)` * `int columnCount (self)` * `int columnMinimumWidth (self, int?column)` * `int columnStretch (self, int?column)` * `int count (self)` * `Qt.Orientations expandingDirections (self)` * `(int?row, int?column, int?rowSpan, int?columnSpan) getItemPosition (self, int?idx)` * `bool hasHeightForWidth (self)` * `int heightForWidth (self, int)` * `int horizontalSpacing (self)` * `invalidate (self)` * `QLayoutItem itemAt (self, int)` * `QLayoutItem itemAtPosition (self, int?row, int?column)` * `QSize maximumSize (self)` * `int minimumHeightForWidth (self, int)` * `QSize minimumSize (self)` * `Qt.Corner originCorner (self)` * `int rowCount (self)` * `int rowMinimumHeight (self, int?row)` * `int rowStretch (self, int?row)` * `setColumnMinimumWidth (self, int?column, int?minSize)` * `setColumnStretch (self, int?column, int?stretch)` * `setDefaultPositioning (self, int?n, Qt.Orientation?orient)` * `setGeometry (self, QRect)` * `setHorizontalSpacing (self, int?spacing)` * `setOriginCorner (self, Qt.Corner)` * `setRowMinimumHeight (self, int?row, int?minSize)` * `setRowStretch (self, int?row, int?stretch)` * `setSpacing (self, int?spacing)` * `setVerticalSpacing (self, int?spacing)` * `QSize sizeHint (self)` * `int spacing (self)` * `QLayoutItem takeAt (self, int)` * `int verticalSpacing (self)` * * * ## Detailed Description 該QGridLayout類,勾畫出一格的小部件。 QGridLayout需要提供給它的空間(由其父布局或受[parentWidget](qlayout.html#parentWidget)( ) ) ,將其劃分成的行和列,并把它管理到正確的單元格每個插件。 列和行具有相同的行為,我們將討論列,但也有同等功能的行。 每一列具有最小寬度和拉伸因子。使用的最小寬度是最大的那組[setColumnMinimumWidth](qgridlayout.html#setColumnMinimumWidth)()和在該列中的每個窗口部件的最小寬度。拉伸系數設置使用[setColumnStretch](qgridlayout.html#setColumnStretch)( ),并且確定如何在可用空間的多列將得到超出其必要的最低限度。 通常情況下,每個被管理的小窗口或布局被放入其自己的小區使用[addWidget](qgridlayout.html#addWidget)( ) 。它也可以用于小窗口使用行和列跨越的重載佔用多個小區[addItem](qgridlayout.html#addItem)()和[addWidget](qgridlayout.html#addWidget)( ) 。如果你這樣做, QGridLayout將猜測如何分配的大小比列/行(基于拉伸的因素) 。 從布局中刪除一個小部件,請致電[removeWidget](qlayout.html#removeWidget)( ) 。調用[QWidget.hide](qwidget.html#hide)( )上的一個小部件也有效地消除了從布局小部件,直到[QWidget.show](qwidget.html#show)()被調用。 此圖顯示了五列,三列網格(網格疊加顯示在洋紅色)對話框的片段: ![A grid layout](https://img.kancloud.cn/b5/16/b51623fb76eabea9ede5004c3910a354_425x150.png) 列0,2和4在該對話框片段是由一個[QLabel](qlabel.html),一[QLineEdit](qlineedit.html)和[QListBox](index.htm#qlistbox)。列1和3是用由佔位符[setColumnMinimumWidth](qgridlayout.html#setColumnMinimumWidth)( ) 。第0行包括三個[QLabel](qlabel.html)對象,三排1[QLineEdit](qlineedit.html)對象和三個第2行[QListBox](index.htm#qlistbox)對象。我們使用佔位符列( 1和3 ),以獲得空間適量的列之間。 請注意,列和行是同樣的寬或高。如果你想兩列具有相同的寬度,必須設置它們的最小寬度和伸展的因素是相同的自己。你就用這[setColumnMinimumWidth](qgridlayout.html#setColumnMinimumWidth)()和[setColumnStretch](qgridlayout.html#setColumnStretch)( ) 。 如果QGridLayout不是頂層布局(即不管理的所有部件的面積和兒童) ,您必須將其添加到其父布局,當你創建它,但是你做任何事情與它前。正常的方式來添加一個布局是通過調用[addLayout](qgridlayout.html#addLayout)( )在父布局。 一旦你添加你的布局就可以開始把控件以及其他布局到您的網格布局的細胞用[addWidget](qgridlayout.html#addWidget)( )[addItem](qgridlayout.html#addItem)()和[addLayout](qgridlayout.html#addLayout)( ) 。 QGridLayout還包括兩個邊寬度:在[contents margin](qlayout.html#getContentsMargins)和[spacing](qgridlayout.html#spacing)( ) 。內容馀量是沿各QGridLayout的四邊的保留空間的寬度。該[spacing](qgridlayout.html#spacing)()是鄰近框之間的自動分配的間隔的寬度。 由提供的默認內容邊距值[style](qstyle.html#pixelMetric)。默認值為Qt的樣式指定為9的子控件和11窗口。的間隔預設為相同的邊寬為頂層布局,或以相同的父布局。 * * * ## Method Documentation ``` QGridLayout.__init__ (self, QWidget?parent) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構造一個新的[QGridLayout](qgridlayout.html)與父部件,_parent_。布局具有一行和一列的最初,并插入新的項目時,也將擴大。 ``` QGridLayout.__init__ (self) ``` 構造一個新的網格布局。 你必須將這個網格到另一個布局。您可以隨時插入控件和布局這個布局,但布局在此之前被插入到另一個布局將不會被執行。 ``` QGridLayout.addItem (self, QLayoutItem?item, int?row, int?column, int?rowSpan?=?1, int?columnSpan?=?1, Qt.Alignment?alignment?=?0) ``` 該_item_說法有它的所有權轉移給Qt的。 添加_item_在位置_row_,_column_,跨越_rowSpan_行和_columnSpan_列,并對齊,根據它_alignment_。如果_rowSpan_和/或_columnSpan_為-1,則該項目將延伸至底部和/或右邊緣,分別。布局采用的所有權_item_。 **Warning:**請不要使用此功能來添加子布局或子部件項目。使用[addLayout](qgridlayout.html#addLayout)()或[addWidget](qgridlayout.html#addWidget)( )來代替。 ``` QGridLayout.addItem (self, QLayoutItem) ``` 該_QLayoutItem_說法有它的所有權轉移給Qt的。 從重新實現[QLayout.addItem](qlayout.html#addItem)( ) 。 ``` QGridLayout.addLayout (self, QLayout, int?row, int?column, Qt.Alignment?alignment?=?0) ``` 該_QLayout_說法有它的所有權轉移給Qt的。 地方_layout_在位置(_row_,_column_)在網格中。左上角的坐標為( 0 ,0)。 該路線是由指定的_alignment_。默認的對齊是0,這意味著該插件充滿整個細胞。 非零對準指示該布局不應成長以填充可用空間,而應根據調整大小[sizeHint](qgridlayout.html#sizeHint)( ) 。 _layout_成為網格布局的一個孩子。 ``` QGridLayout.addLayout (self, QLayout, int?row, int?column, int?rowSpan, int?columnSpan, Qt.Alignment?alignment?=?0) ``` 該_QLayout_說法有它的所有權轉移給Qt的。 這是一個重載函數。 該版本增加了布局_layout_到小區網格,跨越多個行/列。細胞將開始_row_,_column_跨越_rowSpan_行和_columnSpan_列。 If _rowSpan_和/或_columnSpan_是-1,則布局將延伸至底部和/或右邊緣,分別。 ``` QGridLayout.addWidget (self, QWidget?w) ``` 該_w_說法有它的所有權轉移給Qt的。 將給定_widget_到小區網格在_row_,_column_。左上角的位置為( 0 , 0 )在默認情況下。 該路線是由指定的_alignment_。默認的對齊是0,這意味著該插件充滿整個細胞。 ``` QGridLayout.addWidget (self, QWidget, int?row, int?column, Qt.Alignment?alignment?=?0) ``` 該_QWidget_說法有它的所有權轉移給Qt的。 這是一個重載函數。 該版本增加了給定的_widget_到小區網格,跨越多個行/列。細胞將開始_fromRow_,_fromColumn_跨越_rowSpan_行和_columnSpan_列。該_widget_將具有給定的_alignment_。 If _rowSpan_和/或_columnSpan_是-1,則部件將延伸至底部和/或右邊緣,分別。 ``` QGridLayout.addWidget (self, QWidget, int?row, int?column, int?rowSpan, int?columnSpan, Qt.Alignment?alignment?=?0) ``` 該_QWidget_說法有它的所有權轉移給Qt的。 ``` QRect QGridLayout.cellRect (self, int?row, int?column) ``` [ 返回與列的單元格的幾何_row_和列_column_在網格中。返回一個無效的矩形,如果_row_ or _column_是網格之外。 ](qrect.html) [**Warning:**Qt中的當前版本此函數不返回有效的結果,直到](qrect.html)[setGeometry](qgridlayout.html#setGeometry)( )被調用,即后[parentWidget](qlayout.html#parentWidget)()是可見的。 ``` int QGridLayout.columnCount (self) ``` 返回列在該網格的數量。 ``` int QGridLayout.columnMinimumWidth (self, int?column) ``` 返回列間距列_column_。 **See also** [setColumnMinimumWidth](qgridlayout.html#setColumnMinimumWidth)( ) 。 ``` int QGridLayout.columnStretch (self, int?column) ``` 返回列的拉伸因子_column_。 **See also** [setColumnStretch](qgridlayout.html#setColumnStretch)( ) 。 ``` int QGridLayout.count (self) ``` 從重新實現[QLayout.count](qlayout.html#count)( ) 。 ``` Qt.Orientations QGridLayout.expandingDirections (self) ``` [](index.htm) [從重新實現](index.htm)[QLayoutItem.expandingDirections](qlayoutitem.html#expandingDirections)( ) 。 ``` (int?row, int?column, int?rowSpan, int?columnSpan) QGridLayout.getItemPosition (self, int?idx) ``` 用給定的返回的項的位置信息_index_。 通過為變量_row_和_column_與該項目的布局中的位置,并且更新了_rowSpan_和_columnSpan_變量被更新的項目的垂直和水平跨度。 **See also** [itemAtPosition](qgridlayout.html#itemAtPosition)()和[itemAt](qgridlayout.html#itemAt)( ) 。 ``` bool QGridLayout.hasHeightForWidth (self) ``` 從重新實現[QLayoutItem.hasHeightForWidth](qlayoutitem.html#hasHeightForWidth)( ) 。 ``` int QGridLayout.heightForWidth (self, int) ``` 從重新實現[QLayoutItem.heightForWidth](qlayoutitem.html#heightForWidth)( ) 。 ``` int QGridLayout.horizontalSpacing (self) ``` ``` QGridLayout.invalidate (self) ``` 從重新實現[QLayoutItem.invalidate](qlayoutitem.html#invalidate)( ) 。 ``` QLayoutItem QGridLayout.itemAt (self, int) ``` [](qlayoutitem.html) [從重新實現](qlayoutitem.html)[QLayout.itemAt](qlayout.html#itemAt)( ) 。 ``` QLayoutItem QGridLayout.itemAtPosition (self, int?row, int?column) ``` [ 返回佔據細胞布局項目(_row_,_column_) ,或者0,如果單元格為空。 此功能被引入Qt的4.4 。 ](qlayoutitem.html) [**See also**](qlayoutitem.html) [getItemPosition](qgridlayout.html#getItemPosition)()和[indexOf](qlayout.html#indexOf)( ) 。 ``` QSize QGridLayout.maximumSize (self) ``` [](qsize.html) [從重新實現](qsize.html)[QLayoutItem.maximumSize](qlayoutitem.html#maximumSize)( ) 。 ``` int QGridLayout.minimumHeightForWidth (self, int) ``` 從重新實現[QLayoutItem.minimumHeightForWidth](qlayoutitem.html#minimumHeightForWidth)( ) 。 ``` QSize QGridLayout.minimumSize (self) ``` [](qsize.html) [從重新實現](qsize.html)[QLayoutItem.minimumSize](qlayoutitem.html#minimumSize)( ) 。 ``` Qt.Corner QGridLayout.originCorner (self) ``` [ 返回的用于網格的原點的拐角處,即對位置( 0 , 0 ) 。 ](qt.html#Corner-enum) [**See also**](qt.html#Corner-enum) [setOriginCorner](qgridlayout.html#setOriginCorner)( ) 。 ``` int QGridLayout.rowCount (self) ``` 返回行的該網格的數量。 ``` int QGridLayout.rowMinimumHeight (self, int?row) ``` 返回最小寬度設置為行_row_。 **See also** [setRowMinimumHeight](qgridlayout.html#setRowMinimumHeight)( ) 。 ``` int QGridLayout.rowStretch (self, int?row) ``` 返回行的拉伸因子_row_。 **See also** [setRowStretch](qgridlayout.html#setRowStretch)( ) 。 ``` QGridLayout.setColumnMinimumWidth (self, int?column, int?minSize) ``` 設置列的最小寬度_column_至_minSize_像素。 **See also** [columnMinimumWidth](qgridlayout.html#columnMinimumWidth)()和[setRowMinimumHeight](qgridlayout.html#setRowMinimumHeight)( ) 。 ``` QGridLayout.setColumnStretch (self, int?column, int?stretch) ``` 設置列的拉伸因子_column_至_stretch_。第一列是數字0。 拉伸系數是相對于該網格的其他列。列具有更高的拉伸系數取更多的可用空間。 默認拉伸系數為0 。如果拉伸系數為0,在此表中沒有其他的列可以生長在所有的列仍然會增長。 另一種方法是使用添加間距[addItem](qgridlayout.html#addItem)( )與[QSpacerItem](qspaceritem.html)。 **See also** [columnStretch](qgridlayout.html#columnStretch)()和[setRowStretch](qgridlayout.html#setRowStretch)( ) 。 ``` QGridLayout.setDefaultPositioning (self, int?n, Qt.Orientation?orient) ``` ``` QGridLayout.setGeometry (self, QRect) ``` 從重新實現[QLayoutItem.setGeometry](qlayoutitem.html#setGeometry)( ) 。 ``` QGridLayout.setHorizontalSpacing (self, int?spacing) ``` ``` QGridLayout.setOriginCorner (self, Qt.Corner) ``` 設置網格的原點角落,即位置( 0 , 0 ) ,以_corner_。 **See also** [originCorner](qgridlayout.html#originCorner)( ) 。 ``` QGridLayout.setRowMinimumHeight (self, int?row, int?minSize) ``` 設置行的最小高度_row_至_minSize_像素。 **See also** [rowMinimumHeight](qgridlayout.html#rowMinimumHeight)()和[setColumnMinimumWidth](qgridlayout.html#setColumnMinimumWidth)( ) 。 ``` QGridLayout.setRowStretch (self, int?row, int?stretch) ``` 設置行的拉伸因子_row_至_stretch_。第一行是數字0。 拉伸系數是相對于該網格的其他行。行具有更高的拉伸系數取更多的可用空間。 默認拉伸系數為0 。如果拉伸系數為0,在此表中沒有其他行可成長可言,該行仍可能增長。 **See also** [rowStretch](qgridlayout.html#rowStretch)( )[setRowMinimumHeight](qgridlayout.html#setRowMinimumHeight)()和[setColumnStretch](qgridlayout.html#setColumnStretch)( ) 。 ``` QGridLayout.setSpacing (self, int?spacing) ``` 此功能可設置垂直和水平間距_spacing_。 **See also** [spacing](qgridlayout.html#spacing)( )[setVerticalSpacing](qgridlayout.html#verticalSpacing-prop)()和[setHorizontalSpacing](qgridlayout.html#horizontalSpacing-prop)( ) 。 ``` QGridLayout.setVerticalSpacing (self, int?spacing) ``` ``` QSize QGridLayout.sizeHint (self) ``` [](qsize.html) [從重新實現](qsize.html)[QLayoutItem.sizeHint](qlayoutitem.html#sizeHint)( ) 。 ``` int QGridLayout.spacing (self) ``` 如果垂直間距相等的水平間距,該函數返回一個值,否則返回-1。 **See also** [setSpacing](qgridlayout.html#setSpacing)( )[verticalSpacing](qgridlayout.html#verticalSpacing-prop)()和[horizontalSpacing](qgridlayout.html#horizontalSpacing-prop)( ) 。 ``` QLayoutItem QGridLayout.takeAt (self, int) ``` [ 該_QLayoutItem_結果 ](qlayoutitem.html) [從重新實現](qlayoutitem.html)[QLayout.takeAt](qlayout.html#takeAt)( ) 。 ``` int QGridLayout.verticalSpacing (self) ```
                  <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>

                              哎呀哎呀视频在线观看