promote PyQt5 QDockWidget to pyqtgraph.dockarea.Dock

200 views
Skip to first unread message

Tim Williams

unread,
Aug 9, 2016, 2:36:49 PM8/9/16
to pyqtgraph
Hi.

Very new to both PyQt and pyqtgraph. Is there a way to promote a QDockWidget to a Dock widget in pyqtgraph?  I've seen the example in 


but I don't see how to do this for Docks. I want to be able to use QtDesigner to set up a  *.ui file, but also be able to use the more capable Docks in pyqtgraph.

Thanks for any help.

Daniel Lidstrom

unread,
Aug 9, 2016, 2:47:35 PM8/9/16
to pyqtgraph
The DockArea doesn't extend QDockWidget, only QWidget.  So you could promote a QWidget, except for the fact that this assumes the constructor can take a single non-keyword argument and assume it to be its parent, which is not the case for DockArea.  I've got a PR to fix this here:
https://github.com/pyqtgraph/pyqtgraph/pull/158

Tim Williams

unread,
Aug 9, 2016, 3:07:59 PM8/9/16
to pyqtgraph
Thanks for the quick reply. I tried extending a QWidget after failing with QDockWidget. I wasn't sure if I sure promote to a Dock or a DockArea. (Looks like I can't get there from here yet anyway though.) I'll wait and see how your PR shakes out.  
Reply all
Reply to author
Forward
0 new messages