[PyQt] QDockWidgetquestion

Iliya Gogolev iliya at realdice.com
Mon Dec 22 14:54:03 GMT 2008

Hi everyone!

I added QTreeWidget to QDockWidget and then added it to MainWindow by
addDockWidget function:

    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?


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

More information about the PyQt mailing list