<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國際加速解決方案。 廣告
                # QHBoxLayout Class Reference ## [[QtGui](index.htm) module] 該QHBoxLayout,負責班級排隊部件水平。[More...](#details) 繼承[QBoxLayout](qboxlayout.html)。 ### Methods * `__init__ (self)` * `__init__ (self, QWidget?parent)` * * * ## Detailed Description 該QHBoxLayout,負責班級排隊部件水平。 這個類是用于構建橫向box布局對象。看[QBoxLayout](qboxlayout.html)了解詳情。 最簡單的使用類是這樣的: ``` [QWidget](qwidget.html) *window = new [QWidget](qwidget.html); [QPushButton](qpushbutton.html) *button1 = new [QPushButton](qpushbutton.html)("One"); [QPushButton](qpushbutton.html) *button2 = new [QPushButton](qpushbutton.html)("Two"); [QPushButton](qpushbutton.html) *button3 = new [QPushButton](qpushbutton.html)("Three"); [QPushButton](qpushbutton.html) *button4 = new [QPushButton](qpushbutton.html)("Four"); [QPushButton](qpushbutton.html) *button5 = new [QPushButton](qpushbutton.html)("Five"); QHBoxLayout *layout = new QHBoxLayout; layout->addWidget(button1); layout->addWidget(button2); layout->addWidget(button3); layout->addWidget(button4); layout->addWidget(button5); window->setLayout(layout); window->show(); ``` 首先,我們創建我們要在布局窗口小部件。然后,我們創建了QHBoxLayout,負責對象,并添加小工具到布局。最后,我們調用[QWidget.setLayout](qwidget.html#setLayout)( )到QHBoxLayout,負責對象安裝到小部件。在這一點上,在該布局中的窗口小部件被重設父有`window`作為它們的父。 ![Horizontal box layout with five child widgets](https://img.kancloud.cn/82/88/8288f0758cdd11f877c02dc583377c63_437x44.png) * * * ## Method Documentation ``` QHBoxLayout.__init__ (self) ``` 構造一個新的水平框。你必須將它添加到另一個布局。 ``` QHBoxLayout.__init__ (self, QWidget?parent) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構造一個新的頂級水平框父_parent_。
                  <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>

                              哎呀哎呀视频在线观看