Closed yanis60 closed 2 years ago
Yes, the constructor of SARibbonMainWindow
provides an argument : useRibbon
, which defaults to true, and if set to false, it will be same as the QMainWindow.
SARibbonMainWindow(QWidget *parent = nullptr, bool useRibbon = true);
However, online switching is not supported, the software needs to be restarted, and the developer can read the user settings through the configuration file in the main function, and determine whether to use ribbon mode or traditional mode when constructing Mainwindow
Thank you, *could you please add function that allows to create classic menu ? I mean insert menus and actions from ribbon elements.
I'm not sure what “Insert menu and actions from ribbon elements” means:add an classic menu to SARibbonPannel
?
SARibbonPannel
provides a set of functions to add menus and actions:
void addAction(QAction* act, QToolButton::ToolButtonPopupMode popMode, SARibbonPannelItem::RowProportion rp = SARibbonPannelItem::Large);
SARibbonToolButton* addMenu(QMenu* menu,
SARibbonPannelItem::RowProportion rp,
QToolButton::ToolButtonPopupMode popMode = QToolButton::InstantPopup);
SARibbonToolButton* addActionMenu(QAction* action, QMenu* menu, SARibbonPannelItem::RowProportion rp);
no i mean transform ribbon and it elements to classic menu QMenubar
This requirement cannot be met at present, but it can be realized in other ways. As mentioned earlier, in the main function, read the information through the configuration file to determine whether to use the ribbon mode, and then construct the menu according to the ribbon mode and menu bar mode in the construction process of MainWindow. The reason why this method is not implemented is that the ribbon bar is different from the traditional menu bar. The menu bar can be converted to the ribbon bar, but the ribbon bar cannot be converted to the menu bar, because the ribbon bar has some complex controls that the menu bar does not have
ok never mind, thank you so much for the best project ;)
Hi, Is it possible to switch to classic menu bar?