<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6001.18248" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
<DIV><FONT face=Arial size=2>is there a way to move a QDockWidget between two
QMainWindows?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>In the sample code I have two QLabels wrapped
into two QDockwidgets and I want to be able to move them from one
QMainWindow to the other QMainWindow. But it doesen't work. What is missing
in the code?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>
<DIV><FONT face=Arial size=2>Regards</FONT></DIV>
<DIV><FONT face=Arial size=2>Magnus</FONT> </DIV></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>import sys<BR>from PyQt4.QtCore import Qt<BR>from
PyQt4.QtGui import QApplication, QMainWindow, QLabel, QDockWidget</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>app = QApplication(sys.argv)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>mw1 = QMainWindow()<BR>mw2 =
QMainWindow()</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>l1 = QLabel("Label 1")<BR>l2 = QLabel("Label
2")</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>dw1 = QDockWidget("l1")<BR>dw1.setWidget(l1)<BR>dw2
= QDockWidget("l2")<BR>dw2.setWidget(l2)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>mw1.addDockWidget(Qt.LeftDockWidgetArea,
dw1)<BR>mw1.addDockWidget(Qt.RightDockWidgetArea, dw2)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>mw1.show()<BR>mw2.show()</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>sys.exit(app.exec_())</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>