[PyQt] QTableView header connection

Gert-Jan gj_den_heijer at hotmail.com
Wed Mar 18 14:40:45 GMT 2009


Hey all,

Since I still haven't been able to 
http://www.nabble.com/Sorting-column-with-QComboBox-cellwidgets-td22499840.html
automatically sort a column with combo boxes , and now have another column
with special sorting conditions, I'd like to manually do the sorting.

The problem is that I can't seem to make a connection from the header. This
is (very simplified) what I'm doing now:

Class GUI:
	def __init__(self):
		tableWidget = QtGui.QTableWidget()
		# Code to insert 5 columns and make a horizontal header)
		self.connect(tableWidget.horizontalHeader, QtCore.SIGNAL("clicked()"),
self.random_function)

	def random_function(self):
		print 'ok'

However, double-clicking the header does not make the console print 'ok'.

Sooo, anyone got an idea why this is not working?

Thanks in advance for any help!

Cheers,

Gert-Jan
-- 
View this message in context: http://www.nabble.com/QTableView-header-connection-tp22579905p22579905.html
Sent from the PyQt mailing list archive at Nabble.com.



More information about the PyQt mailing list