I tried it too. It did not help.
Sorry, I use QToolBox instead QTreeWidget, but there’s no sense From: Brian Kelley [mailto:[email protected]] Sent: Monday, December 22, 2008 5:00 PM To: Iliya Gogolev; [email protected] Subject: Re: [PyQt] QDockWidgetquestion QDockWidgets behave a little different than normal widgets. You need to call “setWidget” to place a widget in a dock widget. HYPERLINK "http://doc.trolltech.com/4.4/qdockwidget.html"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] HYPERLINK "http://www.riverbankcomputing.com/mailman/listinfo/pyqt"http://www.riverban kcomputing.com/mailman/listinfo/pyqt 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 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
