Forum
Sign Up

RibbonCustomizeManager: How to handle CheckBox etc

3 years 6 months ago #1 by Jörn
Demo RibbonApplication shows how to use customization(with RibbonCustomizeManager, RibbonCustomizeDialog, RibbonBarCustomizePage) of a ribbonbar.
But it seems it could handle actions only.
How can i customize ribbon bar with checkbox, radiobutton, combobox etc.?

Please Log in or Create an account to join the conversation.

More
3 years 4 months ago - 3 years 4 months ago #2 by Developer Machines
For now, the best way to customize custom widgets is to add these to QWidgetAction and add then to RibbonGroup.
Last edit: 3 years 4 months ago by Developer Machines.

Please Log in or Create an account to join the conversation.

More
3 years 4 months ago #3 by Jörn
Thanks for the feedback.

Now i can see new items in the customization dialog and i can handle them in the dialog
But on new pages in the ribbon the items are not visible(or do not exist?)

I have modified the RibbonApplication example and i added a QWidgetAction to Home-page before "Paste"(see code below)

"CheckBoxControl1" is visible in ribbon. Now i add a new page/new group in cutomization dialog and add "CheckBoxControl1" to the new group.
But after leaving customization dialog there is now "CheckBoxControl1" in the new page.

Is my code correct?

Best regards, Jörn

void MainWindow::createGroupClipboard(Qtitan::RibbonPage* page)
{
if (Qtitan::RibbonGroup* groupClipboard = page->addGroup(::qtnIcon(Image_Clipboard), tr("Clipboard")))
{

//// modification
RibbonCheckBoxControl* checkBoxControl1 = new RibbonCheckBoxControl("checkBoxControl1");
QWidgetAction *wa1 = new QWidgetAction(this);
wa1->setDefaultWidget(checkBoxControl1);
wa1->setText("wa1");
groupClipboard->addAction(wa1);
///

groupClipboard->setOptionButtonVisible();

QAction* act = groupClipboard->optionButtonAction();
act->setText(tr("Clipboard"));
act->setIcon(QIcon(":/res/clipboardToolTip.png"));
act->setToolTip(tr("Show the Office clipboard Task Pane"));
act->setStatusTip(tr("Show the Office clipboard Task Pane"));
connect(act, SIGNAL(triggered()), this, SLOT(optionClipboard()));

Please Log in or Create an account to join the conversation.

More
  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Moderators: Developer MachinesEduard
Time to create page: 0.127 seconds

Developer Newsletter

Join our Developer Machines newsletter to get informed on all the latest releases of the commercial components for Qt.C++, Delphi FireMonkey, updates and general knowledges.

Quick Support

Should you need any additional information about our products or licensing, please contact us at the following email addresses:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

Get in Touch

If you would like to purchase our products or services, but don’t know how to do it the right way, please feel free to contact us:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.( any questions related to our products or services )
  • This email address is being protected from spambots. You need JavaScript enabled to view it.( questions related to licensing )