Closed bbc131 closed 7 months ago
Thanks for the easy repro. Fixed now.
Only now I checked this and still found wrong titles displayed, when you use the "(un)dock" button.
To reproduce, use the same code example as before and then press the "(un)dock" button on any floating DockWidget
to dock it into the MainWindow
.
(I tested it on current state of main branch, commit 763c8a795c
.)
While playing with this, it seems that some other things might affect the behavior, without being able to narrow it down precisely.
It seems to be easier to reproduce, if there are all the DockWidget
s in the example hidden except of two.
Further, sometimes it seems, that the problem occurs only if the DockWidget
was set floating using the "(un)dock".
fixed 2nd issue + test, please test again.
I guess you fixed a different problem... I extended the test, by the exact use case I meant, this fails for me. https://github.com/bbc131/KDDockWidgets/commit/9814de36931bbd0b36ab4d9dafb0a0c4fd26bfda
I want to modify a dockwidgets title depending on the floating-state.
Therefore I was going to suggest to add an
isFloatingChanged
signal to theQtWidgets::DockWidget
class as done here https://github.com/bbc131/KDDockWidgets/commit/883754a1568a690fde85005182f22b7f50e7f9ff.But it seems, that there is a problem with the underlying signal.
To reproduce with the
dockwidgets
example, apply the commit above and add the following code toMyMainWindow::newDockWidget
as shown hereNow run the example, undock any DockWidget and then dock it onto any other DockWidget, such that they appear tabbed. The title in the TabBar is wrong, it still shows the "FLOATING" text. The TitleBar's text is correct. See the following screenshot, where I docked
#2
onto#0
.