Works fine here.
	
	#include <QtGui/QApplication>
#include <QTableWidget>
 
int main(int argc, char *argv[])
{
 
    tblCol1->setBackground(Qt::red);
    tableWidget.setHorizontalHeaderItem(0, tblCol1);
    tableWidget.show();
 
    return a.exec();
}
        #include <QtGui/QApplication>
#include <QTableWidget>
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    QTableWidget tableWidget(2,2);
    QTableWidgetItem *tblCol1 = new QTableWidgetItem("Column 1");
    tblCol1->setBackground(Qt::red);
    tableWidget.setHorizontalHeaderItem(0, tblCol1);
    tableWidget.show();
    return a.exec();
}
To copy to clipboard, switch view to plain text mode 
  snapshot1..png
				
			
Bookmarks