Hello everyone,

I am relatively new to pyQt and I have a question regarding the QTableView. I have derived a view class from QTableView class and I have implemented a context menu by adding a method like this:

    def contextMenuEvent(self, event):
        self.datasetMenu.exec_(event.globalPos())

where datasetMenu is a Menu I have created in the constructor.

This works very nicely, but I noticed that the popup will only be created when clicking inside of the tableview. However, I would like to present a context menu when the user clicks on the column header.

What can I do to achieve this?

Niklas Volbers.

_______________________________________________
PyKDE mailing list    [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to