#include int main(int argc, char* argv[]) { QApplication app(argc, argv); app.setLayoutDirection(Qt::RightToLeft); auto tableWidget = new QTableWidget; tableWidget->setRowCount(5); tableWidget->setColumnCount(5); for (int row = 0; row < 5; ++row) { for (int column = 0; column < 5; ++column) { QTableWidgetItem *newItem = new QTableWidgetItem(QString("%1/%2").arg(row).arg(column)); tableWidget->setItem(row, column, newItem); } } tableWidget->show(); return app.exec(); }