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

DockWidget ignore default size #274

Open
Daguerreo opened this issue Feb 8, 2022 · 1 comment
Open

DockWidget ignore default size #274

Daguerreo opened this issue Feb 8, 2022 · 1 comment

Comments

@Daguerreo
Copy link

Default size seems to be ignored and docks placed always with the fair option.

   KDDockWidgets::MainWindow m{"main_window", KDDockWidgets::MainWindowOption_None};
   auto d1 = new KDDockWidgets::DockWidget("D1");
   auto d2 = new KDDockWidgets::DockWidget("D2");
   auto d3 = new KDDockWidgets::DockWidget("D3");
   m.addDockWidget(d1, KDDockWidgets::Location_OnLeft, nullptr, QSize(200, 600));
   m.addDockWidget(d2, KDDockWidgets::Location_OnRight);
   m.addDockWidget(d3, KDDockWidgets::Location_OnBottom);

   m.resize(1200, 800);
   m.show();

dock

@iamsergio
Copy link
Contributor

the preferred size is only honoured when inserting, so, if you insert d1 last, it should work

It gets very difficult to handle all the edge cases otherwise

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