Problem with QDockWidget placement
-
Hi,
I have a prototype, where I use QDockWidget. That widget is allowed for all docking areas.
Initially the docking widget is placed at the bottom area.
App looks fine.
Then I drag the docking to a side-area, which of cause causes the dock-widget to resize.
Dragging widget from side area to bottom area does not work.Don't know, how to proceed.
Does the docking process depend on some size hints/properties, or how can I change behaviour, so that the widget can be dragged to the bottom area again?
I guess that there is some relation to current size of docking widget. During testing it happened, that the window width was so high, that dragging from bottom to side area was refused too.
I'd like to establish docking process without any size restrictions, as both windows are sizeable.
-
Hi
That sounds a bit odd. If it's an allowed area then the size should not matter.Can you reproduce it with the Dock example?

-
Hi,
actually no.
Then I compared both apps, and the biggest difference at quick look is, that I don't have any scrollbars. Just Labels and edits in a formlayout or gridlayout.
It looks like resizing of central widget works horizontally only. -
Hi,
actually no.
Then I compared both apps, and the biggest difference at quick look is, that I don't have any scrollbars. Just Labels and edits in a formlayout or gridlayout.
It looks like resizing of central widget works horizontally only.@django-Reinhard
HI
Ok so its not a Qt version issue.Do you have anything in central that cannot become smaller. something with setMinimumSize ?
I dont have any guesses on why it wont dock back again from side to bottom as not seen that before.
-
@mrjj said in Problem with QDockWidget placement:
Do you have anything in central that cannot become smaller. something with setMinimumSize ?
No, not in central widget.
But in docking widget I change fontsize based on the available space and set minimum width:
P.S. sorry - don't know how to embed image preview
-
@mrjj said in Problem with QDockWidget placement:
Do you have anything in central that cannot become smaller. something with setMinimumSize ?
No, not in central widget.
But in docking widget I change fontsize based on the available space and set minimum width:
P.S. sorry - don't know how to embed image preview
@django-Reinhard
Hi
Could you try to create a new DockWidget . Just empty one and see
if that also does the same?Then we know if something that is inside Dock or something else.
- P.S. sorry - don't know how to embed image preview
np, it worked clicking on them :9
- P.S. sorry - don't know how to embed image preview
-
Good point - thank you!
I reduced the content of the docking widget to one line and it does not work.
Then I dragged the dockable to the desktop, where I could resize it on a second step. With the minimal size of the dockable, docking to bottom works.
Then I played with the size of the dockable and as soon as the size is bigger, than the space, that could be made available by squeezing center widget, dragging to bottom will be refused.Well, knowing the behaviour, I could work around it. Not nice, but ok.
Thank you!