QTableWidgetItem *item = new QTableWidgetItem("Hello World");
item->setTextAlignment(Qt::AlignCenter);
QFont font("Arial", 12); item->setFont(font);
ui->tableWidget->setItem(0, 0, item);In this example, we have a QTableWidget object named "tableWidget" and we are adding the QTableWidgetItem object at row 0 and column 0. These are just a few of the many things you can do with QTableWidgetItem. It is a very versatile and useful class for working with table widgets in Qt.