![]() |
SARibbon 2.5.1
SARibbon wiki
|
用于管理一组Action,类似于QToolBar 更多...
#include <SARibbonButtonGroupWidget.h>
Public 成员函数 | |
SARibbonButtonGroupWidget (QWidget *parent=nullptr) | |
void | addMenuAction (QAction *menuAction, QToolButton::ToolButtonPopupMode popupMode=QToolButton::InstantPopup) |
Add a menu QAction to the button group widget/在按钮栏中添加一个带菜单的 QAction | |
QAction * | addMenuAction (QMenu *menu, QToolButton::ToolButtonPopupMode popupMode=QToolButton::InstantPopup) |
Create and add a menu action to the button group widget (text only version)/在按钮栏中创建并添加一个带菜单的动作(仅文本版本) | |
用于管理一组Action,类似于QToolBar
void SARibbonButtonGroupWidget::addMenuAction | ( | QAction * | menuAction, |
QToolButton::ToolButtonPopupMode | popupMode = QToolButton::InstantPopup |
||
) |
Add a menu QAction to the button group widget/在按钮栏中添加一个带菜单的 QAction
This function is used to add a QAction that has been associated with a menu to the toolbar and set its popup mode.The popup mode of the tool button determines how users interact with the menu.
此函数用于向工具栏添加一个已经关联了菜单的 QAction,并设置其弹出模式。工具按钮的弹出模式决定了用户如何与菜单进行交互。
menuAction | QAction object that has been set with a menu/已经设置了菜单的 QAction 对象 |
popupMode | Popup mode of the tool button, default is InstantPopup/工具按钮的弹出模式,默认为 InstantPopup |
QAction * SARibbonButtonGroupWidget::addMenuAction | ( | QMenu * | menu, |
QToolButton::ToolButtonPopupMode | popupMode = QToolButton::InstantPopup |
||
) |
Create and add a menu action to the button group widget (text only version)/在按钮栏中创建并添加一个带菜单的动作(仅文本版本)
This function creates a new QAction based on the specified text, associates it with the specified menu, adds it to the toolbar, and sets the popup mode.
此函数根据指定的文本创建一个新的 QAction,将其与指定菜单关联,添加到工具栏并设置弹出模式。
text | Button text/按钮文本 |
menu | Menu object to associate/要关联的菜单对象 |
popupMode | Popup mode of the tool button, default is InstantPopup/工具按钮的弹出模式,默认为 InstantPopup |