We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
// The 2nd MainWindow within first MainWindow does not show its dockWidgets when toggled
using namespace KDDockWidgets;
DockWidget *createDockWidget(MainWindow mainWindow, QMenu mainWindowMenu, const QString &label, const QStringList affinities = {}) { auto dockWidget = new DockWidget(label); dockWidget->setAffinities(affinities); QLabel *l = new QLabel(label); dockWidget->setWidget(l); mainWindow->addDockWidget(dockWidget, Location::Location_OnTop); mainWindowMenu->addAction(dockWidget->toggleAction()); return dockWidget; }
int main(int argc, char **argv) { QApplication app(argc, argv);
MainWindow * mainWindow = new MainWindow("mainWindow"); QMenu *mainWindowMenu = mainWindow->menuBar()->addMenu("Toggle1"); createDockWidget(mainWindow, mainWindowMenu, "L1"); createDockWidget(mainWindow, mainWindowMenu, "L2"); auto mainWindowDockWidget3 = new DockWidget("mainWindowInMainWindow"); MainWindow* mainWindow2 = new MainWindow("mainWindow2"); QMenu *mainWindowMenu2 = mainWindow2->menuBar()->addMenu("Toggle2"); const QStringList affinities { "DwInDw" }; mainWindow2->setAffinities(affinities); mainWindowDockWidget3->setWidget(mainWindow2); mainWindow->addDockWidget(mainWindowDockWidget3, Location_OnRight); createDockWidget(mainWindow2, mainWindowMenu2, "L3", affinities); createDockWidget(mainWindow2, mainWindowMenu2, "L4", affinities); // Note - widgets show correctly on initialization, // but when Toggle1/mainWindowInMainWindow is toggled, the dock widgets L3 & L4 // are not shown mainWindowMenu->addAction(mainWindowDockWidget3->toggleAction()); mainWindow->resize(800, 800); mainWindow->show(); return app.exec();
}
The text was updated successfully, but these errors were encountered:
Above code compiles and runs correctly on initialization - but note the key comment:
// Note - widgets show correctly on initialization, // but when Toggle1/mainWindowInMainWindow is toggled, the dock widgets L3 & L4 // are not shown
Sorry, something went wrong.
Add test for issue #360
1d97ada
Issue #326 is in the way, so added a workaround. When #326 is fixed, this test will test both code paths.
tests: Add another test for #360
0440294
The bug happens with normal non-nested main windows as well. Closing a main window and then reshowing it will show with all its dock widgets hidden
iamsergio
No branches or pull requests
// The 2nd MainWindow within first MainWindow does not show its dockWidgets when toggled
using namespace KDDockWidgets;
DockWidget *createDockWidget(MainWindow mainWindow, QMenu mainWindowMenu, const QString &label, const QStringList affinities = {})
{
auto dockWidget = new DockWidget(label);
dockWidget->setAffinities(affinities);
QLabel *l = new QLabel(label);
dockWidget->setWidget(l);
mainWindow->addDockWidget(dockWidget, Location::Location_OnTop);
mainWindowMenu->addAction(dockWidget->toggleAction());
return dockWidget;
}
int main(int argc, char **argv)
{
QApplication app(argc, argv);
}
The text was updated successfully, but these errors were encountered: