Can't dock a dock widget on the right?
-
I have this in my ui/StackingDlg.h
dockWidget->setFeatures(QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable); dockWidget->setAllowedAreas(Qt::BottomDockWidgetArea|Qt::RightDockWidgetArea); : StackingDlg->addDockWidget(Qt::BottomDockWidgetArea, dockWidget);
I can float the dock widget and redock it at the bottom by d-clicking its title, and I can dock it at the bottom by dragging it there, but I don't seem to be able to can't dock it on the right by dragging it there.
What have I missed?
-
The code looks correct.
Which Qt Version are you using? A lot of work on dock widgets (incl. area permissions) has been done in 6.4. -
Thanks, I'll look into it right away and get back to you.
It appears to me, that you have found a bug. -
Further information:
I enabled all dock widget areas. I can dock at the top or bottom, but not left or right :(. I added a debug out to report the result of isAreaAllowed for the right hand area and this is what it said:
isAreaAllowed(Qt::RightDockWidgetArea): true
HtH
David -
That's a bug I am afraid. If you allow, I'll copy your findings in a Jira ticket.
-
I struggle to reproduce that one.
Could you post your entire code?
To be sure, could you also test our dock widgets example? The paragraphs dock widget is able to dock at any dock. -
Good morning, thanks! The Jira ticket is here.