Forum
Sign Up

use qtitanribbon and qtitandocking

7 years 1 week ago #1 by Shuai Wang
I want to Use the two frameworks of qtitanribbon and qtitandocking in a project. the project base on qtitanribbon , but i also need some function of qtitandocking . could you give me some demos of that? email:[email protected]

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

More
7 years 1 week ago #2 by Developer Machines
First, please install the latest version on qtitandocking 1.1. Unfortunately. 1.0 version contains the bug that does not allow to use ribbon + docking in the same app.:((

Add docking to RibbonMainWindow:

With the current version of ribbon you have to add the docking as a central widget of the RibbonMainWindow.
void MyRibbonWindow::createWidget()
{
    DockMainWindow* pMainWindow = new DockMainWindow(0, Qt::Widget);
    DockToolBar* tooBar = pMainWindow->addToolBar("My Toolbar", Qtitan::DockBarTop);
    tooBar->addAction("Test_But_1");
    tooBar->addAction("Test_But_2");
    tooBar->addAction("Test_But_3");
    DockWidgetPanel* dockPanel1 = pMainWindow->addDockPanel("My Panel 1", QSize(200, 50), Qt::LeftDockWidgetArea);
    DockWidgetPanel* dockPanel2 = pMainWindow->addDockPanel("My Panel 2", QSize(200, 50), Qt::BottomDockWidgetArea, dockPanel1);
    dockPanel2->setWidget(new QTextEdit);
    setCentralWidget(pMainWindow);
}

In QtitanRibbon version 5 will be possible to add the docking to RibbonMainWindow like for common QWidget.

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

More
7 years 1 week ago - 7 years 1 week ago #3 by Developer Machines
Other way is to add the ribbon ui to DockMainWindow:
class MyDockWindow: public DockMainWindow
{
......
};

void MyDockWindow::createRibbonUI()
{
    qApp->setStyle(new RibbonStyle);
    RibbonBar* bar = new RibbonBar();
    bar->setTitleBarVisible(false);
    bar->quickAccessBar()->addAction("Test");
    bar->quickAccessBar()->setVisible(true);
    RibbonPage* page = bar->addPage("Test Page");
    RibbonGroup* group = page->addGroup("Group");
    group->addAction(QIcon(), "Button", Qt::ToolButtonTextOnly);
    this->setMenuBar(bar);
}

Attachments:
Last edit: 7 years 1 week ago by Developer Machines.

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.154 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 )