QDockWidgets behave a little different than normal widgets. You need to call "setWidget" to place a widget in a dock widget.
http://doc.trolltech.com/4.4/qdockwidget.html Try: CustomDockWidget(QDockWidget): def __init__(self,parent): QDockWidget.__init__(self, parent) self.tree = QTreeWidget(self) self.setWidget(self.tree) On 12/22/08 9:54 AM, "Iliya Gogolev" <[email protected]> wrote: Hi everyone! I added QTreeWidget to QDockWidget and then added it to MainWindow by addDockWidget function: """"""""""""""""""""""""""""""""""""""""""" CustomDockWidget(QDockWidget): def __init__(self,parent): QDockWidget.__init__(self, p_parent) self.tree = QTreeWidget(self) . . . """"""""""""""""""""""""""""""""""""""""""" class MainWindow(QMainWindow): def __init__(self, p_parent = None): QMainWindow.__init__(self, p_parent) self.customWidget = CustomDockWidget(self) self.addDockWidget (Qt.LeftDockWidgetArea, self.customWidget) . . . I'm trying to catch mouse event in MainWindow when I click on the QTreeWidget and no success. Any ideas? Thanks Internal Virus Database is out-of-date. Checked by AVG. Version: 7.5.549 / Virus Database: 270.9.10/1814 - Release Date: 11/26/2008 8:53 PM _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
_______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
