1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00
LibQQt/qqttablewidget.h
2017-08-20 22:24:29 +08:00

41 lines
885 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);
/**
* @brief removeRows
* @param column 根据这一列的值进行删除
* @param ids 需要删除的列值列表
*/
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