def __init__(self, widget=None, parent=None):
        QtGui.QDockWidget.__init__(self, parent)
        self.setFeatures(QtGui.QDockWidget.AllDockWidgetFeatures)  
        self.mwindow = QtGui.QMainWindow(self)
        self.centralwidget = widget
        self.mwindow.setWindowFlags(QtCore.Qt.Widget) 
        self.mwindow.setCentralWidget(widget)     
        self.setWidget(self.mwindow)
        self.createToolBar()
        if widget:
            self.setWindowTitle(widget.windowTitle())
        self.pinStatus = False
        self.monitorWindowTitle(widget)
        
        self.connect(self, QtCore.SIGNAL("topLevelChanged(bool)"),
                     self.setDefaultPinStatus)
QToolWindow(parent: QWidget) -> QToolWindow
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/gui/common_widgets.py/QToolWindow.__init__