KDAB / KDDockWidgets

KDAB's Dock Widget Framework for Qt
https://www.kdab.com/development-resources/qt-tools/kddockwidgets
Other
753 stars 164 forks source link

DockWidget ignore default size #274

Open Daguerreo opened 2 years ago

Daguerreo commented 2 years ago

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 commented 2 years ago

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