MCPcopy Create free account
hub / github.com/czyt1988/SARibbon / createWindowButtonGroupBar

Method createWindowButtonGroupBar

example/MainWindowExample/mainwindow.cpp:2869–2881  ·  view source on GitHub ↗

* \if ENGLISH * @brief Create window button group bar * @details Add custom tool buttons next to system window buttons (minimize, maximize, close). * This allows you to add custom buttons to the title bar area. * \endif * * \if CHINESE * @brief 创建窗口按钮组栏 * @details 在系统窗口按钮(最小化、最大化、关闭)旁边添加自定义工具按钮。 * 这允许您在标题栏区域添加自定义按钮。 * \endif */

Source from the content-addressed store, hash-verified

2867 * \endif
2868 */
2869void MainWindow::createWindowButtonGroupBar()
2870{
2871 SARibbonSystemButtonBar* windowButtonBar = this->windowButtonBar();
2872 if (!windowButtonBar) {
2873 return;
2874 }
2875 QAction* actionLogin = new QAction(QIcon(), tr("Login"), this);
2876 QAction* actionHelp = createAction(tr("help"), ":/icon/icon/help.svg");
2877 connect(actionLogin, &QAction::triggered, this, &MainWindow::onLoginActionTriggered);
2878 connect(actionHelp, &QAction::triggered, this, &MainWindow::onActionHelpTriggered);
2879 windowButtonBar->addAction(actionLogin);
2880 windowButtonBar->addAction(actionHelp);
2881}
2882
2883/**
2884 * \if ENGLISH

Callers

nothing calls this directly

Calls 2

windowButtonBarMethod · 0.45
addActionMethod · 0.45

Tested by

no test coverage detected