PDA

View Full Version : how to get QTableWidgets horizontal header?



aurora
14th December 2011, 06:38
Hi is there any way to get the QTableWidget's horizontal header directly?


currently i'm doing as below....

for(int i=0;i<temp->columnCount();i++)
{
rowPtr=temp->horizontalHeaderItem(i);
QString str=rowPtr->text();
std::cout<<"the item is:"<<str.toStdString()<<endl;
}

ChrisW67
14th December 2011, 09:18
Other than QTableView::horizontalHeader()?