How to change orientation of Qt TableView
问题 Hi I am using a QTableView to display data from a sql table using the qsqltablemodel asfollows: MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); model = new QSqlTableModel(this); model->setTable("staging"); model->select(); model->setHeaderData(0, Qt::Vertical, tr("ID")); model->setHeaderData(1, Qt::Vertical, tr("Region")); model->setHeaderData(2, Qt::Vertical, tr("T1")); model->setHeaderData(3, Qt::Vertical, tr("N1")); model-