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

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # QToolBar Class Reference ## [[QtGui](index.htm) module] 該QToolBar類提供了一個可移動的面板,它包含了一組控件。[More...](#details) 繼承[QWidget](qwidget.html)。 ### Methods * `__init__ (self, QString?title, QWidget?parent?=?None)` * `__init__ (self, QWidget?parent?=?None)` * `QAction actionAt (self, QPoint?p)` * `QAction actionAt (self, int?ax, int?ay)` * `actionEvent (self, QActionEvent?event)` * `QRect actionGeometry (self, QAction?action)` * `addAction (self, QAction?action)` * `QAction addAction (self, QString?text)` * `QAction addAction (self, QIcon?icon, QString?text)` * `QAction addAction (self, QString?text, QObject?receiver, SLOT()SLOT()?member)` * `QAction addAction (self, QString?text, callable?receiver)` * `QAction addAction (self, QIcon?icon, QString?text, QObject?receiver, SLOT()SLOT()?member)` * `QAction addAction (self, QIcon?icon, QString?text, callable?receiver)` * `QAction addSeparator (self)` * `QAction addWidget (self, QWidget?widget)` * `Qt.ToolBarAreas allowedAreas (self)` * `changeEvent (self, QEvent?event)` * `childEvent (self, QChildEvent?event)` * `clear (self)` * `bool event (self, QEvent?event)` * `QSize iconSize (self)` * `initStyleOption (self, QStyleOptionToolBar?option)` * `QAction insertSeparator (self, QAction?before)` * `QAction insertWidget (self, QAction?before, QWidget?widget)` * `bool isAreaAllowed (self, Qt.ToolBarArea?area)` * `bool isFloatable (self)` * `bool isFloating (self)` * `bool isMovable (self)` * `Qt.Orientation orientation (self)` * `paintEvent (self, QPaintEvent?event)` * `resizeEvent (self, QResizeEvent?event)` * `setAllowedAreas (self, Qt.ToolBarAreas?areas)` * `setFloatable (self, bool?floatable)` * `setIconSize (self, QSize?iconSize)` * `setMovable (self, bool?movable)` * `setOrientation (self, Qt.Orientation?orientation)` * `setToolButtonStyle (self, Qt.ToolButtonStyle?toolButtonStyle)` * `QAction toggleViewAction (self)` * `Qt.ToolButtonStyle toolButtonStyle (self)` * `QWidget widgetForAction (self, QAction?action)` ### Qt Signals * `void actionTriggered (QAction *)` * `void allowedAreasChanged (Qt::ToolBarAreas)` * `void iconSizeChanged (const QSize&)` * `void movableChanged (bool)` * `void orientationChanged (Qt::Orientation)` * `void toolButtonStyleChanged (Qt::ToolButtonStyle)` * `void topLevelChanged (bool)` * `void visibilityChanged (bool)` * * * ## Detailed Description 該QToolBar類提供了一個可移動的面板,它包含了一組控件。 工具欄按鈕加入添加_actions_,使用[addAction](qtoolbar.html#addAction)()或[insertAction](qwidget.html#insertAction)( ) 。按鈕組,可以使用分離[addSeparator](qtoolbar.html#addSeparator)()或[insertSeparator](qtoolbar.html#insertSeparator)( ) 。如果工具欄按鈕是不合適的,一個部件可以被插入,而不是使用[addWidget](qtoolbar.html#addWidget)()或[insertWidget](qtoolbar.html#insertWidget)();合適的窗口小部件的實例是[QSpinBox](qspinbox.html),[QDoubleSpinBox](qdoublespinbox.html)和[QComboBox](qcombobox.html)。當按下工具欄按鈕,它發出的[actionTriggered](qtoolbar.html#actionTriggered)()信號。 工具欄可以被固定在適當位置中的特定區域(例如,在窗口的頂部) ,或者它可以是可移動的([isMovable](qtoolbar.html#movable-prop)( ) )工具欄區域之間,見[allowedAreas](qtoolbar.html#allowedAreas-prop)()和[isAreaAllowed](qtoolbar.html#isAreaAllowed)( ) 。 當一個工具欄調整大小以這樣一種方式,它是太小,無法顯示其包含的所有項目,分機鍵會出現在工具欄上的最后一個項目。按分機鍵會彈出包含目前不適合工具欄上的項目菜單。 當QToolBar不是一個孩子[QMainWindow](qmainwindow.html),它失去了使用帶有添加到工具欄小工具來填充擴展彈出的能力[addWidget](qtoolbar.html#addWidget)( ) 。請使用通過繼承創建控件的行為[QWidgetAction](qwidgetaction.html)和實施[QWidgetAction.createWidget](qwidgetaction.html#createWidget)( )來代替。 * * * ## Method Documentation ``` QToolBar.__init__ (self, QString?title, QWidget?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構造一個[QToolBar](qtoolbar.html)用給定的_parent_。 給定的窗口_title_標識的工具欄,并顯示在所提供的上下文菜單[QMainWindow](qmainwindow.html)。 **See also** [setWindowTitle](qwidget.html#windowTitle-prop)( ) 。 ``` QToolBar.__init__ (self, QWidget?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構造一個[QToolBar](qtoolbar.html)用給定的_parent_。 ``` QAction QToolBar.actionAt (self, QPoint?p) ``` [ 返回點的動作_p_。該函數返回零,如果發現任何行動。 ](qaction.html) [**See also**](qaction.html) [QWidget.childAt](qwidget.html#childAt)( ) 。 ``` QAction QToolBar.actionAt (self, int?ax, int?ay) ``` [ 這是一個重載函數。 返回行動在點_x_,_y_。該函數返回零,如果發現任何行動。 ``` QToolBar.actionEvent (self, QActionEvent?event) ``` ](qaction.html) [從重新實現](qaction.html)[QWidget.actionEvent](qwidget.html#actionEvent)( ) 。 ``` QRect QToolBar.actionGeometry (self, QAction?action) ``` [ ``` QToolBar.addAction (self, QAction?action) ``` 這是一個重載函數。 追加行動_action_對行動的工具欄的列表。 ](qrect.html) [**See also**](qrect.html) [QMenu.addAction](qmenu.html#addAction)()和[QWidget.addAction](qwidget.html#addAction)( ) 。 ``` QAction QToolBar.addAction (self, QString?text) ``` [ 這是一個重載函數。 創建一個新的動作與給定_text_。這個動作被添加到工具欄的末尾。 ](qaction.html) ``` QAction QToolBar.addAction (self, QIcon?icon, QString?text) ``` [ 這是一個重載函數。 創建一個新的動作與給定_icon_和_text_。這個動作被添加到工具欄的末尾。 ](qaction.html) ``` QAction QToolBar.addAction (self, QString?text, QObject?receiver, SLOT()SLOT()?member) ``` [ 這是一個重載函數。 ](qaction.html) [創建一個新的動作與給定_text_。這個動作被添加到工具欄的末尾。動作的](qaction.html)[triggered()](qaction.html#triggered)信號被連接到_member_在_receiver_。 ``` QAction QToolBar.addAction (self, QString?text, callable?receiver) ``` [ 這是一個重載函數。 ](qaction.html) [創建帶有圖標的新動作_icon_和文本_text_。這個動作被添加到工具欄的末尾。動作的](qaction.html)[triggered()](qaction.html#triggered)信號被連接到_member_在_receiver_。 ``` QAction QToolBar.addAction (self, QIcon?icon, QString?text, QObject?receiver, SLOT()SLOT()?member) ``` [](qaction.html) ``` QAction QToolBar.addAction (self, QIcon?icon, QString?text, callable?receiver) ``` [](qaction.html) ``` QAction QToolBar.addSeparator (self) ``` [ 添加分隔到工具欄的末尾。 ](qaction.html) [**See also**](qaction.html) [insertSeparator](qtoolbar.html#insertSeparator)( ) 。 ``` QAction QToolBar.addWidget (self, QWidget?widget) ``` [ 該_widget_說法有它的所有權轉移給Qt的。 將給定_widget_到工具欄與工具欄的最后一個項目。 該工具欄需要的所有權_widget_。 ](qaction.html) [如果添加](qaction.html)[QToolButton](qtoolbutton.html)用這種方法,工具欄的[Qt.ToolButtonStyle](qt.html#ToolButtonStyle-enum)將不被尊重。 **Note:**您應該使用[QAction.setVisible](qaction.html#visible-prop)( )來改變控件的可見性。運用[QWidget.setVisible](qwidget.html#visible-prop)( )[QWidget.show](qwidget.html#show)()和[QWidget.hide](qwidget.html#hide)( )不起作用。 **See also** [insertWidget](qtoolbar.html#insertWidget)( ) 。 ``` Qt.ToolBarAreas QToolBar.allowedAreas (self) ``` [ ``` QToolBar.changeEvent (self, QEvent?event) ``` ](index.htm) [從重新實現](index.htm)[QWidget.changeEvent](qwidget.html#changeEvent)( ) 。 ``` QToolBar.childEvent (self, QChildEvent?event) ``` 從重新實現[QObject.childEvent](qobject.html#childEvent)( ) 。 ``` QToolBar.clear (self) ``` 移除工具欄上的所有操作。 **See also** [removeAction](qwidget.html#removeAction)( ) 。 ``` bool QToolBar.event (self, QEvent?event) ``` 從重新實現[QObject.event](qobject.html#event)( ) 。 ``` QSize QToolBar.iconSize (self) ``` [ ``` QToolBar.initStyleOption (self, QStyleOptionToolBar?option) ``` ](qsize.html) ``` QAction QToolBar.insertSeparator (self, QAction?before) ``` [ 插入分隔到工具欄與相關的工具欄項前_before_行動。 ](qaction.html) [**See also**](qaction.html) [addSeparator](qtoolbar.html#addSeparator)( ) 。 ``` QAction QToolBar.insertWidget (self, QAction?before, QWidget?widget) ``` [ 該_widget_說法有它的所有權轉移給Qt的。 插入給定_widget_與相關的工具欄項前_before_行動。 ](qaction.html) [注意:您應該使用](qaction.html)[QAction.setVisible](qaction.html#visible-prop)( )來改變控件的可見性。運用[QWidget.setVisible](qwidget.html#visible-prop)( )[QWidget.show](qwidget.html#show)()和[QWidget.hide](qwidget.html#hide)( )不起作用。 **See also** [addWidget](qtoolbar.html#addWidget)( ) 。 ``` bool QToolBar.isAreaAllowed (self, Qt.ToolBarArea?area) ``` 返回True如果這個工具欄可停靠在給定的_area_否則返回False 。 ``` bool QToolBar.isFloatable (self) ``` ``` bool QToolBar.isFloating (self) ``` ``` bool QToolBar.isMovable (self) ``` ``` Qt.Orientation QToolBar.orientation (self) ``` [ ``` QToolBar.paintEvent (self, QPaintEvent?event) ``` ](qt.html#Orientation-enum) [從重新實現](qt.html#Orientation-enum)[QWidget.paintEvent](qwidget.html#paintEvent)( ) 。 ``` QToolBar.resizeEvent (self, QResizeEvent?event) ``` 從重新實現[QWidget.resizeEvent](qwidget.html#resizeEvent)( ) 。 ``` QToolBar.setAllowedAreas (self, Qt.ToolBarAreas?areas) ``` ``` QToolBar.setFloatable (self, bool?floatable) ``` ``` QToolBar.setIconSize (self, QSize?iconSize) ``` 這種方法也是一個Qt槽與C + +的簽名`void setIconSize(const QSize&)`。 ``` QToolBar.setMovable (self, bool?movable) ``` ``` QToolBar.setOrientation (self, Qt.Orientation?orientation) ``` ``` QToolBar.setToolButtonStyle (self, Qt.ToolButtonStyle?toolButtonStyle) ``` 這種方法也是一個Qt槽與C + +的簽名`void setToolButtonStyle(Qt::ToolButtonStyle)`。 ``` QAction QToolBar.toggleViewAction (self) ``` [ 返回一個可用于顯示或隱藏該工具欄可檢查的動作。 該操作的文本設置為工具欄的窗口標題。 ](qaction.html) [**See also**](qaction.html) [QAction.text](qaction.html#text-prop)和[QWidget.windowTitle](qwidget.html#windowTitle-prop)。 ``` Qt.ToolButtonStyle QToolBar.toolButtonStyle (self) ``` [](qt.html#ToolButtonStyle-enum) ``` QWidget QToolBar.widgetForAction (self, QAction?action) ``` [ 返回與指定相關的部件_action_。 這個函數中引入了Qt 4.2中。 ](qwidget.html) [**See also**](qwidget.html) [addWidget](qtoolbar.html#addWidget)( ) 。 * * * ## Qt Signal Documentation ``` void actionTriggered (QAction *) ``` 這是該信號的默認超載。 當在這個工具欄的作用是觸發這個信號被發射。發生這種情況時按下的動作的工具按鈕時,或當動作被觸發在工具欄以外的其他方式。該參數保存在觸發_action_。 ``` void allowedAreasChanged (Qt::ToolBarAreas) ``` 這是該信號的默認超載。 當允許的區域為工具欄的集合更改這個信號被發射。在該工具條可以定位在新的區域被指定_allowedAreas_。 **See also** [allowedAreas](qtoolbar.html#allowedAreas-prop)。 ``` void iconSizeChanged (const QSize&) ``` 這是該信號的默認超載。 當圖標大小改變這個信號被發射。該_iconSize_參數保存工具欄上的新圖標的大小。 **See also** [iconSize](qtoolbar.html#iconSize-prop)和[QMainWindow.iconSize](qmainwindow.html#iconSize-prop)。 ``` void movableChanged (bool) ``` 這是該信號的默認超載。 當工具欄變成可移動的或固定的這個信號被發射。如果工具欄可以移動,_movable_為True,否則為False 。 **See also** [movable](qtoolbar.html#movable-prop)。 ``` void orientationChanged (Qt::Orientation) ``` 這是該信號的默認超載。 這個信號被發射時的工具欄上的變化的方向。新的方向被指定的_orientation_給出。 **See also** [orientation](qtoolbar.html#orientation-prop)。 ``` void toolButtonStyleChanged (Qt::ToolButtonStyle) ``` 這是該信號的默認超載。 當工具按鈕樣式改變這個信號被發射。該_toolButtonStyle_參數保存工具欄的新工具按鈕樣式。 **See also** [toolButtonStyle](qtoolbar.html#toolButtonStyle-prop)和[QMainWindow.toolButtonStyle](qmainwindow.html#toolButtonStyle-prop)。 ``` void topLevelChanged (bool) ``` 這是該信號的默認超載。 這個信號被發射時的[floating](qtoolbar.html#floating-prop)屬性更改。該_topLevel_參數為True時,如果工具欄現在是浮動的,否則它是假的。 此功能被引入Qt的4.6 。 **See also** [isWindow](qwidget.html#isWindow)( ) 。 ``` void visibilityChanged (bool) ``` 這是該信號的默認超載。 當工具欄變成這個信號被發射_visible_(或不可見) 。這種情況發生在小部件隱藏或顯示。 此功能被引入Qt的4.7 。
                  <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>

                              哎呀哎呀视频在线观看