Forum
Sign Up

QtitanDocking 2.3.0+QtitanRibbon 5.0.0: showDockPanel does not show docked panel

5 years 7 months ago #1 by Jörn
The code below should show or hide dockPanel1 if button "Button" is pressed.
If dockPanel1 is floating this works. But if dockPanel1 is docked the panel could be hidden but not shown again.

:h
#pragma once

#include <QtitanRibbon.h>
#include <QtitanDocking.h>


class GuiTest : public RibbonMainWindow
{
Q_OBJECT

public:
GuiTest(QWidget *parent = Q_NULLPTR);

private:
Ui::GuiTest ui;
DockPanelManager *dockPanelManager;
DockWidgetPanel* dockPanel1;
QAction *TestAct;

public slots:
void panelActionTriggered();

};


:cpp

#include <QtitanRibbon.h>
#include <QtitanDocking.h>

GuiTest::GuiTest(QWidget *parent)
: RibbonMainWindow(parent)
{
QLatin1String m_defaultStyle("windowsvista");
qApp->style()->setObjectName(m_defaultStyle);

ui.setupUi(this);

setWindowTitle("QtitanRibbon + QtitanDocking");

ribbonBar()->setFrameThemeEnabled(true);
ribbonBar()->setTitleBarVisible(true);

QWidget *widget = new QWidget;
dockPanelManager = new DockPanelManager(widget);
dockPanelManager->setDockPanelTransparentWhileDragging(true);
dockPanelManager->setArrowMarkersShown(true);
dockPanelManager->setDockPanelFullContentsWhileDraggingShown(true);
setCentralWidget(widget);

////// 2 - Creating a ribbon
ribbonBar()->setFrameThemeEnabled();
RibbonPage *page = ribbonBar()->addPage("&Buttons1");

////// 3 - Creating a dockBarManager
DockBarManager* managerBar = new DockBarManager(widget);
DockToolBar* tooBar = managerBar->addToolBar("My Toolbar", Qtitan::DockBarTop);
TestAct = tooBar->addAction("Button");
TestAct->setCheckable(true);
TestAct->setChecked(true);
connect(TestAct, SIGNAL(triggered()), this, SLOT(panelActionTriggered()));

////// 4 - Creating a panelManager
dockPanel1 = dockPanelManager->addDockPanel("My Panel_1", Qtitan::LeftDockPanelArea);
dockPanel1->setWidget(new QLabel("panel1"));
DockWidgetPanel* dockPanel2 = dockPanelManager->addDockPanel("My Panel_2", Qtitan::RightDockPanelArea);
dockPanel2->setWidget(new QLabel("panel2"));
}

void GuiTest::panelActionTriggered()
{
if (TestAct->isChecked())
dockPanelManager->showDockPanel(dockPanel1);
else
dockPanel1->closePanel();
}

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

More
4 years 5 months ago - 4 years 5 months ago #2 by Eduard
Hello!
We’ve used your source code to reproduce the error of QtitanRibbon 5.3.1 and QtitanDocking 3.1.0 versions. But we didn’t succeed. Please, update these components. To see it clear to you, we send you gif file.
Attachments:
Last edit: 4 years 5 months ago by Eduard.

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

  • Eduard
  • Eduard's Avatar
  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Moderators: Developer Machines
Time to create page: 0.138 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 )