Forum
Sign Up

RibbonGroup and RibbonToolBarControl issues. QtitanRibbon6.0.0

2 years 2 months ago #1 by Vlad
Hi, I have troubles with RibbonGroup and RibbonToolBarControl.
1) RibbonGroup doesn't resize correctly after adding actions.
I want all controls to be the same width. After action was added I get RibbonControl by action from group and set fixed width to this control. But buttons overlap each other.
Code:
pGroup->addAction(img, text, style);
RibbonControl* control = pGroup->controlByAction(pAct);
control->setFixedWidth(50);
Looks like group layout adjusts only when action added.
2) For RibbonToolBarControl doesn't work setMargin. In previous version all was fine.
Code:
RibbonToolBarControl* pToolbar= new RibbonToolBarControl(group);
pToolbar->setMargin(5);
// adding actions...
group->addControl(pToolbar);

OS Windows 11, Qt6.2.2, msvc2019_x64

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

More
2 years 2 months ago #2 by Developer Machines
pGroup->addAction(img, text, style);

What "style" is used to create the button here?

Could you add some screenshot regarding the issues (before/now)?

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

More
2 years 2 months ago - 2 years 2 months ago #3 by Vlad
I tried Qt::ToolButtonTextUnderIcon and Qt::ToolButtonTextBesideIcon, same result. Image attached.
Attachments:
Last edit: 2 years 2 months ago by Vlad.

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

More
2 years 2 months ago #4 by Developer Machines
Thanks for the screenshot.

1) For current version you have to set the fixed size to the internal widget. For this caset just query it to RibbonButtonControl, see the code:
RibbonButtonControl* control = qobject_cast<RibbonButtonControl*>(group->controlByAction(action));
    if (control)
        control->widget()->setFixedWidth(20);

2) Margin bug has been fixed. Fix will be available in next 6.1 version.
The following user(s) said Thank You: Vlad

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 Machines
Time to create page: 0.236 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 )