anItem = horizontalHeaderItem( section );
else
anItem = verticalHeaderItem( section );
- if ( !anItem ) {
- QVariant aValue = headerData( o, section );
+
+ if ( anItem )
+ anItem->setData( Qt::DisplayRole, var );
+ else {
anItem = new QTableWidgetItem();
- anItem->setData( Qt::DisplayRole, aValue );
+ anItem->setData( Qt::DisplayRole, var );
if ( o == Qt::Horizontal )
setHorizontalHeaderItem( section, anItem );
else
setVerticalHeaderItem( section, anItem );
}
-
- if ( model() )
- model()->setHeaderData( section, o, var, role );
}
void QtxTable::setHeaderFont( const Qt::Orientation o, const int section, const QFont& font )
void QtxTable::clear( const bool withHeaders )
{
if ( withHeaders )
- clear();
+ QTableWidget::clear();
else
clearContents();