Dragging QDockWidgets between QMainWindows

前端 未结 1 1400
我在风中等你
我在风中等你 2020-12-30 14:12

I have a question regarding dragging QDockWidgets between QMainWindows. I have an application with different \"DockAreas\" which have a QMainWindow member with one or more Q

相关标签:
1条回答
  • 2020-12-30 14:55

    I'm wrestling with the same Problem right now and want to share.

    Ich found this forum post dealing with the same problem: http://www.qtcentre.org/threads/41847-Dragging-QDockWidgets-between-QMainWindows This solution is however flawed: it doesn't work properly if you allow the Dockables to be floating. And the enterEvent does not actually trigger when you enter the other window and still dragging the QDockWidget. It only triggers after release.

    I'm also going for the reparenting (1). QDrag seems problematic when you also want to allow rearranging the QDockWidget within the Window.

    I think one would correctly do this by reacting to the drop/release of the dragged QDockWidget. But I can't find an event or signal for this.

    0 讨论(0)
提交回复
热议问题