Actually, for my use case the nicest solution looks like making a clone of DockArea.docks, then passing that as an optional argument to DockArea.restoreState() and DockArea.buildFromState()--allowing it to re-insert an existing Dock instead of creating a new one.
I've been playing around with this in a fork & it seems to work well enough. Is this something that anyone else might be interested in? On Monday, March 19, 2018 at 4:04:10 PM UTC-4, Jim Crowell wrote: > > > My users got excited when I showed them the 'dockarea' demo, so I'm trying > to work out how it works under the hood...it looks like it doesn't work > well in conjunction with the dock close button? I see > restoreState(missing='create') option, but that seems to only create an > empty Dock (without inserting it in DockArea.docks, which looks like a bug). > > I'm wondering, is there a nice way to re-attach an existing but invisible > Widget to a DockArea after restoreState()? I was able to hack it by storing > a copy of the original DockArea.docks & replacing missing widgets from it > after restoreState()... > > > -- You received this message because you are subscribed to the Google Groups "pyqtgraph" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/974bf4cd-cc77-48b2-bb64-b42f530afc29%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
