一、软件界面
二、源码
#include "MainWindow.h"
#include "ui_MainWindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
ui->tbQuery->setDisabled(true);
ui->tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers); //设置不可编辑
ui->tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows); //设置选择模式,选择单行
ui->tableWidget->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
ui->tableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
}
MainWindow::~MainWindow()
{
delete ui;
}</