QueryResultModel inherits from QAbstractTableModel now instead of BaseTableModel and the tableview now gets a custom delegate.

This commit is contained in:
eelke 2018-01-15 12:23:41 +01:00
parent 3ac1d21728
commit 208883462c
3 changed files with 51 additions and 41 deletions

View file

@ -1,13 +1,13 @@
#ifndef QUERYRESULTMODEL_H
#define QUERYRESULTMODEL_H
//#include <QAbstractTableModel>
#include <QAbstractTableModel>
#include "BaseTableModel.h"
#include "Pgsql_Connection.h"
class PgDatabaseCatalog;
class QueryResultModel : public BaseTableModel
class QueryResultModel : public QAbstractTableModel
{
Q_OBJECT
public:
@ -20,8 +20,8 @@ public:
// virtual Qt::ItemFlags flags(const QModelIndex &index) const override;
protected:
virtual Oid getType(int column) const override;
virtual QVariant getData(const QModelIndex &index) const override;
// virtual Oid getType(int column) const override;
// virtual QVariant getData(const QModelIndex &index) const override;
private:
std::shared_ptr<Pgsql::Result> result;
std::shared_ptr<PgDatabaseCatalog> catalog;