1、把下列文件放在工程中【已上传到我的文件中】
2、代码
auto *headview = new HHeadViewClass(Qt::Horizontal, ui.tableWidget);
headview->setSectionResizeMode(QHeaderView::Interactive);
headview->titleHigh = 50;
headview->setFixedHeight(50);
headview->SetRowColItemText(0, 0, QStringLiteral("公里"));
headview->SetRowColItemText(1, 0, QStringLiteral("长度[m]"));
headview->SetRowColItemText(2, 0, QStringLiteral("高低"));
headview->SetRowColItemText(2, 1, QStringLiteral("1"));
headview->SetRowColItemText(2, 2, QStringLiteral("2"));
headview->SetRowColItemText(2, 3, "3");
headview->SetRowColItemText(2, 4, "4");
headview->SetRowColItemText(3, 0, QStringLiteral("轨向"));
headview->SetRowColItemText(3, 1, "1");