[Qt-interest] how to set check box on QTableWidget's header

jiangzhw2008 jiangzhw2008 at yeah.net
Wed Jun 30 12:26:11 CEST 2010


I'm trying to implement a table widget which has checkable items in it.


And I want to place a check box on the horizontal header to let user "Check All" and "Uncheck All" by checking or unchecking this check box.

Does anybody know how to do this?

I tried the following:

QTableWidgetItem* item = new QTableWidgetItem("Check");
item->setCheckState(Qt::Checked);
table->setHorizontalHeaderItem(0, item);

But the header does not have a check box on it.

Hope someone can help me...

Thanks in advance


Zhengwei JIANG

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100630/cd255b9f/attachment.html 


More information about the Qt-interest-old mailing list