[PyQt] Sending a Signal from a QTableWidget header

Hans-Peter Jansen hpj at urpla.net
Sun Jan 22 15:57:36 GMT 2012


On Sunday 22 January 2012, 16:38:21 Hans-Peter Jansen wrote:
> On Saturday 21 January 2012, 23:21:18 starglider.dev wrote:
> > Hi,
> > I need to open a dialog if the user click in the QTableWidget
> > header.
>
> There's no such class in PyQt (nor in Qt). If you mean QTable, then
> QHeader.clicked() is proably, wat you're looking for.

Scratch that, I looked up the wrong docs. 

Since QTableWidget inherits from QTableView, the 
{horizontal,vertical}Header() methods return a QHeaderView instance, 
which emits e.g. sectionPressed(int). 

Sorry for the confusion.

Pete


More information about the PyQt mailing list