1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00
LibQQt/qqttablewidget.h
tianduanrui 3f857669fc init
2016-12-29 16:49:18 +08:00

34 lines
727 B
C++
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef QQTTABLEWIDGET_H
#define QQTTABLEWIDGET_H
#include "qqttableview.h"
#include "qqttablemodel.h"
namespace Ui {
class QQTTableWidget;
}
class QQTTableWidget : public QQTTableView
{
Q_OBJECT
public:
explicit QQTTableWidget(QWidget *parent = 0);
~QQTTableWidget();
void setDB(QString db = "");
void setTable(QString table);
void query(QString excp = "");
//在TableWidget中删除的行肯定是选中的行设定
void removeRow(int row);
void removeRows(int column, QList<QStringList> ids);
void selectedRows(int column, QMap<int, QStringList>& ids);
private:
Ui::QQTTableWidget *ui;
QQTTableModel* m_model;
QSqlDatabase m_db;
};
#endif // QQTTABLEWIDGET_H