qtablewidget align center code example
Example 1: qtablewidget align center
QTableWidgetItem * protoitem = new QTableWidgetItem();
protoitem->setTextAlignment(Qt::AlignLeft);
etc...
Example 2: qtablewidget align center
QTableWidget::setItemPrototype ( const QTableWidgetItem * item )
Example 3: qtablewidget align center
QTableWidgetItem * newitem = protoitem->clone();
tableWidget->setItem(0,0, newitem);