Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force toggleViewInternal(true) when adding new DockWidget to Container #148

Closed
DatName opened this issue Apr 18, 2020 · 2 comments
Closed

Comments

@DatName
Copy link

DatName commented Apr 18, 2020

First of all, thank you for sharing this great piece of software! Really appreciate it!

I apologize in advance if I am missing something obvious (I just started digging this recently), but I have a following problem. When closing all DockWidgets via GUI, I am not able to see new DockWidgets, when I am adding them programmatically. My setup is this:

CDockManager::setConfigFlags(CDockManager::DefaultOpaqueConfig);
CDockManager::setConfigFlag(CDockManager::DockAreaHasTabsMenuButton, false);
CDockManager::setConfigFlag(CDockManager::RetainTabSizeWhenCloseButtonHidden, true);

m_dockManager = new ads::CDockManager(parent);

than later I have following slot (label is "proportional" to number of previously added widgets

counter += 1
ads::CDockWidget* dockWidget = new ads::CDockWidget(label + QString::number(counter));
dockWidget->setWidget(myWidget); 
m_dockManager->addDockWidget(ads::TopDockWidgetArea, dockWidget);

Note, that I intentionally do not use toggelViewAction() provided by dockWidget.
So at first, this works perfectly. But when I close all widgets via GUI close button, newly added DockWidgets are not shown in GUI.

Adding toggleViewInternal(true) right after addDockArea(NewDockArea, area); in DockContainerWidgetPrivate::dockWidgetIntoContainer() fixes the issue for me.

I really can not tell if this is OK to forcibly toggle Open state like this or it just hides some other problem and the issue should really be fixed some other way.

@githubuser0xFFFF
Copy link
Owner

Is it possible for you to provide a minimum testcase that shows this problem?

githubuser0xFFFF added a commit that referenced this issue May 7, 2020
…idgets have ben closed in the GUI - fix for GitHub issue #148
@githubuser0xFFFF
Copy link
Owner

I just pushed a commit that should fix this issue. The demo application now also has the test action Create Docked Editor to test this. Please checkout the master and test, if the issue is fixed.

luelista pushed a commit to luelista/Qt-Advanced-Docking-System that referenced this issue Mar 22, 2022
…idgets have ben closed in the GUI - fix for GitHub issue githubuser0xFFFF#148
luelista pushed a commit to luelista/Qt-Advanced-Docking-System that referenced this issue Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants