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

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # QButtonGroup Class Reference ## [[QtGui](index.htm) module] 該QButtonGroup類提供一個容器來組織按鈕控件組。[More...](#details) 繼承[QObject](qobject.html)。 ### Methods * `__init__ (self, QObject?parent?=?None)` * `addButton (self, QAbstractButton)` * `addButton (self, QAbstractButton, int?id)` * `QAbstractButton button (self, int?id)` * `list-of-QAbstractButton buttons (self)` * `QAbstractButton checkedButton (self)` * `int checkedId (self)` * `bool exclusive (self)` * `int id (self, QAbstractButton?button)` * `removeButton (self, QAbstractButton)` * `setExclusive (self, bool)` * `setId (self, QAbstractButton?button, int?id)` ### Qt Signals * `void buttonClicked (QAbstractButton *)` * `void buttonClicked (int)` * `void buttonPressed (QAbstractButton *)` * `void buttonPressed (int)` * `void buttonReleased (QAbstractButton *)` * `void buttonReleased (int)` * * * ## Detailed Description 該QButtonGroup類提供一個容器來組織按鈕控件組。 QButtonGroup提供了一個抽象的容器,其中按鈕控件可以放置。它不提供此容器的可視化表示(見[QGroupBox](qgroupbox.html)對于一個容器控件) ,而是管理組中每個按鈕的狀態。 一個[exclusive](qbuttongroup.html#exclusive-prop)按鈕組關閉所有可復(切換)按鈕,除了被點擊的之一。默認情況下,一個按鈕組是獨占的。在一個按鈕組中的按鈕通常是可復[QPushButton](qpushbutton.html)的,[QCheckBox](qcheckbox.html)ES (通常用于非排他性按鈕組) ,或[QRadioButton](qradiobutton.html)秒。如果你創建一個專屬按鈕組,你應該確保該組中的一個按鈕初步檢查,否則,本集團將首先在沒有任何按鍵被選中的狀態。 按鈕添加到組[addButton](qbuttongroup.html#addButton)( ) 。它可以從組中刪除[removeButton](qbuttongroup.html#removeButton)( ) 。如果該組是獨占的,目前檢查按鈕,可作為[checkedButton](qbuttongroup.html#checkedButton)( ) 。如果點擊一個按鈕[buttonClicked](qbuttongroup.html#buttonClicked)()信號被發射。對于獨家組可檢查的按鈕,這意味著被選中的按鈕。組中的按鈕列表是由返回[buttons](qbuttongroup.html#buttons)( ) 。 此外, QButtonGroup可以整數和按鈕之間進行映射。您可以指定一個整數ID的按鈕[setId](qbuttongroup.html#setId)( ),并與檢索[id](qbuttongroup.html#id)( ) 。當前選中按鈕的ID可與[checkedId](qbuttongroup.html#checkedId)( ) ,并有一個重載信號[buttonClicked](qbuttongroup.html#buttonClicked)(),它發射的按鈕的ID。這個id`-1`由QButtonGroup保留的意思是“沒有這樣的按鈕” 。映射機制的目的是簡化枚舉值中的用戶接口的表示。 * * * ## Method Documentation ``` QButtonGroup.__init__ (self, QObject?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構造一個新的空按鈕組給定的_parent_。 **See also** [addButton](qbuttongroup.html#addButton)()和[setExclusive](qbuttongroup.html#exclusive-prop)( ) 。 ``` QButtonGroup.addButton (self, QAbstractButton) ``` 將給定_button_以本集團內部的按鈕列表的末尾。一個ID將這個被分配到按鈕[QButtonGroup](qbuttongroup.html)。自動分配的ID都保證是負的,從-2 。如果您還指定自己的ID,請使用正確的價值觀,以避免沖突。 **See also** [removeButton](qbuttongroup.html#removeButton)()和[buttons](qbuttongroup.html#buttons)( ) 。 ``` QButtonGroup.addButton (self, QAbstractButton, int?id) ``` 將給定_button_在按鈕組中,與給定_id_。建議在分配唯一積極的IDS 。 **See also** [removeButton](qbuttongroup.html#removeButton)()和[buttons](qbuttongroup.html#buttons)( ) 。 ``` QAbstractButton QButtonGroup.button (self, int?id) ``` [ 返回按鈕具有指定_id_,或者0,如果沒有這樣的按鈕存在。 這個函數是Qt 4.1中引入。 ``` list-of-QAbstractButton QButtonGroup.buttons (self) ``` 返回該組的按鈕列表。這可能是空的。 ](qabstractbutton.html) [**See also**](qabstractbutton.html) [addButton](qbuttongroup.html#addButton)()和[removeButton](qbuttongroup.html#removeButton)( ) 。 ``` QAbstractButton QButtonGroup.checkedButton (self) ``` [ 返回按鈕組的檢查按鈕,或者0,如果沒有按鈕被選中。 ](qabstractbutton.html) [**See also**](qabstractbutton.html) [buttonClicked](qbuttongroup.html#buttonClicked)( ) 。 ``` int QButtonGroup.checkedId (self) ``` 返回的的ID[checkedButton](qbuttongroup.html#checkedButton)( ) ,或-1,如果檢查沒有按鈕。 這個函數是Qt 4.1中引入。 **See also** [setId](qbuttongroup.html#setId)( ) 。 ``` bool QButtonGroup.exclusive (self) ``` ``` int QButtonGroup.id (self, QAbstractButton?button) ``` 返回的ID所指定_button_,或-1,如果沒有這樣的按鈕存在。 這個函數是Qt 4.1中引入。 **See also** [setId](qbuttongroup.html#setId)( ) 。 ``` QButtonGroup.removeButton (self, QAbstractButton) ``` 刪除給定的_button_從按鈕組。 **See also** [addButton](qbuttongroup.html#addButton)()和[buttons](qbuttongroup.html#buttons)( ) 。 ``` QButtonGroup.setExclusive (self, bool) ``` ``` QButtonGroup.setId (self, QAbstractButton?button, int?id) ``` 設置_id_為指定的_button_。需要注意的是_id_不能為-1。 這個函數是Qt 4.1中引入。 **See also** [id](qbuttongroup.html#id)( ) 。 * * * ## Qt Signal Documentation ``` void buttonClicked (QAbstractButton *) ``` 這是該信號的默認超載。 這個信號被發射給定的時_button_被點擊。當它第一次按下一個按鈕被點擊,然后釋放,當它的快捷鍵鍵入,或編程時[QAbstractButton.click](qabstractbutton.html#click)()或[QAbstractButton.animateClick](qabstractbutton.html#animateClick)()被調用。 **See also** [checkedButton](qbuttongroup.html#checkedButton)()和[QAbstractButton.clicked](qabstractbutton.html#clicked)( ) 。 ``` void buttonClicked (int) ``` 這個信號被發射時,在給定的一個按鈕_id_被點擊。 **See also** [checkedButton](qbuttongroup.html#checkedButton)()和[QAbstractButton.clicked](qabstractbutton.html#clicked)( ) 。 ``` void buttonPressed (QAbstractButton *) ``` 這是該信號的默認超載。 這個信號被發射給定的時_button_被按下。 這個函數中引入了Qt 4.2中。 **See also** [QAbstractButton.pressed](qabstractbutton.html#pressed)( ) 。 ``` void buttonPressed (int) ``` 這個信號被發射時,在給定的一個按鈕_id_被按下。 這個函數中引入了Qt 4.2中。 **See also** [QAbstractButton.pressed](qabstractbutton.html#pressed)( ) 。 ``` void buttonReleased (QAbstractButton *) ``` 這是該信號的默認超載。 這個信號被發射給定的時_button_被釋放。 這個函數中引入了Qt 4.2中。 **See also** [QAbstractButton.released](qabstractbutton.html#released)( ) 。 ``` void buttonReleased (int) ``` 這個信號被發射時,在給定的一個按鈕_id_被釋放。 這個函數中引入了Qt 4.2中。 **See also** [QAbstractButton.released](qabstractbutton.html#released)( ) 。
                  <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>

                              哎呀哎呀视频在线观看