[PyQt] Same widget in multiple locations

Darryl Wallace darryl.wallace at prosensus.ca
Fri Jan 15 21:03:59 GMT 2010

Quick question and i think I already know the answer, but I'll throw it out

Is it possible to display the same QWidget in different places?

Quick background.. I'm making some plots using PyQwt.  These plots are
connected to a "play/pause" tool bar with position slider to update the plot
contents.  I've changed my program flow such that one main toolbar to
control the plots is not sufficient as they may now have data from different

My idea was to create one toolbar to control each plot from the same group
of plots, except I wanted to display the toolbar in each plot subwindow.
 This way I could avoid having to make multiple connections all going back
to the same place.

Now this means displaying the same widget in multiple locations on the
screen at once (one within each plot child window).  Is it possible to
display the same widget in different places?

I've tried just adding the same object to a layout and it shows up only in
one of the windows.  I've also tried using a graphicsview/scene combination
where I add the widget to the scene, but this yields an error reported to
the console by QGraphicsProxyWidget saying that the widget was already
Any help would be much appreciated if it's possible.  But I think the answer
is that the same widget cannot be shown in more than one location.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100115/bf1cfd94/attachment.html>

More information about the PyQt mailing list