Question

I have a widget with 4 QGraphicsViews and I want them to be dockable. I've put a QGraphicsView in a QDockWidget. Then I was able to undock the view, but I don't know how to dock the view back, where it was. At the begin, there is a bar with an undock button, but when the widget is undocked, then this bar is gone.

What do I need to do, to dock the widget on it's original/starting position? Or is this QDockWidget not for things like that? I would be very grateful for some help.

Était-ce utile?

La solution

Just drag the widget back to its starting position, and the main window should grab it automatically. If this doesn't work for you, take a look at the Dock Widgets example program (Qt Creator -> Help -> Contents -> Tutorials and Examples -> Main Window Examples -> Dock Widgets). If even this example program doesn't work, then something is wrong with your Qt installation!

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top