Forum
Sign Up

bug report : multi panels docking together, mouse resize not work

1 year 7 months ago - 1 year 7 months ago #1 by yimin
Hello Sir,
Our application base on docking and ribbon, and when some docking panels docking together, they can't resizer operation by mouse when change tab tag. I must redock the panels and mouse resize work.
MainWindow::MainWindow(QWidget *parent)
    : RdfRibbonMainWindow(parent)
    , ui(new Ui::MainWindow)
    {
    setCustomStyle("Office2010Blue");
    qApp->installEventFilter(this);

    createDockMainWindow();
    //createNormalDockMainWindow();
    createRibbon();
    createMdiDocumentExample();
   }

void MainWindow::createRibbon()
{
    RibbonPage* pageButtons = ribbonBar()->addPage(QStringLiteral("&主页"));
    QMenu* splitPopup = new QMenu(this);
    splitPopup->addAction(tr("Option 1"));
    splitPopup->addAction(tr("Option 2"));
    splitPopup->addAction(tr("Option 3"));

    RibbonGroup* groupClipboard = pageButtons->addGroup(tr("Clipboard"));
    QMenu* editPaste = new QMenu(this);
    QAction* actionPaste1 = editPaste->addAction(QIcon(":/res/smallClipboard.png"), tr("Paste"));
    actionPaste1->setPriority(QAction::LowPriority);
    actionPaste1->setShortcut(QKeySequence::Paste);

    QAction* actionPaste2 = groupClipboard->addAction(QIcon(":/res/clipboard.png"),
        tr("&Paste"), Qt::ToolButtonTextUnderIcon, editPaste);
    actionPaste2->setPriority(QAction::LowPriority);
    actionPaste2->setShortcut(QKeySequence::Paste);

    QAction* actionCut = groupClipboard->addAction(QIcon(":/res/smallCut.png"),
        tr("&Cut"), Qt::ToolButtonTextBesideIcon);
    actionCut->setShortcut(QKeySequence::Cut);

    QAction* actionCopy = groupClipboard->addAction(QIcon(":/res/smallCopy.png"),
        tr("&Copy"), Qt::ToolButtonTextBesideIcon);
    actionCopy->setShortcut(QKeySequence::Copy);

    groupClipboard->addAction(QIcon(":/res/smallFormatPainter.png"),
        tr("F&ormat Pointer"), Qt::ToolButtonTextBesideIcon);
    groupClipboard->setEnabled(false);

    RibbonGroup* groupView = pageButtons->addGroup(QStringLiteral("窗口"));
    QCheckBox* checkStatusBar = new QCheckBox(tr("Status Bar"));
    checkStatusBar->setToolTip(tr("CheckBox 1"));
    checkStatusBar->setCheckState(Qt::Checked);
    groupView->addWidget(checkStatusBar);
    connect(checkStatusBar, SIGNAL(stateChanged(int)), this, SLOT(hideStatusBar(int)));

    ribbonBar()->addPage(QStringLiteral("&模型"));
    ribbonBar()->addPage(QStringLiteral("&显示"))->setContextColor(ContextColorGreen);
    ribbonBar()->setFrameThemeEnabled();
}

void MainWindow::createDockMainWindow()
{
   
    m_holder = new RdfDockMainWindow(this);
    m_holder->setAttribute(Qt::WA_CanHostQMdiSubWindowTitleBar);

    m_holder->dockPanelManager()->setDockPanelTransparentWhileDragging(true);
    m_holder->dockPanelManager()->setArrowMarkersShown(true);
    m_holder->dockPanelManager()->setDockPanelFullContentsWhileDraggingShown(true);
    m_holder->dockPanelManager()->centralLayoutPanel();
    //mdiArea = new MdiArea(m_holder);


    
    mdiArea = new MdiArea(m_holder);
    mdiArea->setLineWidth(3);
    mdiArea->setFrameShape(QFrame::Panel);
    mdiArea->setFrameShadow(QFrame::Sunken);
    mdiArea->setViewMode(QMdiArea::TabbedView);
    qApp->installEventFilter(this);
    mdiArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
    mdiArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);

   
    setCentralWidget(m_holder);
    m_holder->dockPanelManager()->setCentralWidget(mdiArea);
    m_holder->dockPanelManager()->centralWidget()->setFocus();
    m_holder->createDockPanels();
}
Attachments:
Last edit: 1 year 7 months ago by yimin.

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

More
1 year 7 months ago #2 by Max
Thank your very much for your message. The error's been reproduced and fixed. The fix will be available in the next version.

Software Developer

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 MachinesMax
Time to create page: 0.114 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 )