摘要:
方法:创造model类继承QSqlTableModel,然后重载data函数头文件:#ifndef INCOME_MODEL_H#define INCOME_MODEL_H#include <QSqlTableModel>class Income_Model : public QSqlTableModel{public: Income_Model(QObject * parent = 0, QSqlDatabase db = QSqlDatabase()); ~Income_Model(); QVariant data(const QModelIndex &idx, int 阅读全文