You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m working with Qt Advanced Docking System (ADS) in my QMainWindow.
Currently, I can dock widgets side by side, but when I drag and drop a new widget next to another, the sizes are not equal — the new one just squeezes in.
What I want
Whenever I place a new widget beside another (by drag & drop), all widgets in that splitter should automatically take equal width.
For example, if I already have 2 widgets side by side and I drop a 3rd one, I want all three to resize to 1/3 each.
but this only affects the insertion moment, not rebalancing when dragging around.
Manually connecting to dockWidgetAdded and calling splitter->setSizes(...), but it doesn’t always cover user drag-and-drop repositioning.
Question
👉 How can I force equal splitter sizes automatically after a widget is dragged/dropped beside others in ADS DockManager?
Is there a signal or best practice for rebalancing splitter sizes every time the layout changes?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I’m working with Qt Advanced Docking System (ADS) in my QMainWindow.
Currently, I can dock widgets side by side, but when I drag and drop a new widget next to another, the sizes are not equal — the new one just squeezes in.
What I want
Whenever I place a new widget beside another (by drag & drop), all widgets in that splitter should automatically take equal width.
For example, if I already have 2 widgets side by side and I drop a 3rd one, I want all three to resize to 1/3 each.
What I tried
ads::CDockManager::setConfigFlag(ads::CDockManager::EqualSplitOnInsertion, true);
but this only affects the insertion moment, not rebalancing when dragging around.
Question
👉 How can I force equal splitter sizes automatically after a widget is dragged/dropped beside others in ADS DockManager?
Is there a signal or best practice for rebalancing splitter sizes every time the layout changes?
Beta Was this translation helpful? Give feedback.
All reactions