You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
629 B
C++

#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QVector>
#include <QStandardItemModel>
#include "student.h"
QT_BEGIN_NAMESPACE
namespace Ui
{
class MainWindow;
}
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
private slots:
void on_addButton_clicked();
void on_deleteButton_clicked();
private:
Ui::MainWindow *ui;
QVector<Student> students; // 学生信息列表
QStandardItemModel *model; // 数据模型
void refreshTable(); // 刷新表格显示
};
#endif // MAINWINDOW_H