diff --git a/pglab/HorizontalProxyModel.cpp b/pglab/HorizontalProxyModel.cpp index e11c41b..f50f6f1 100644 --- a/pglab/HorizontalProxyModel.cpp +++ b/pglab/HorizontalProxyModel.cpp @@ -5,7 +5,7 @@ HorizontalProxyModel::HorizontalProxyModel(QObject *parent) - : QAbstractProxyModel(parent) + : QIdentityProxyModel(parent) { } diff --git a/pglab/HorizontalProxyModel.h b/pglab/HorizontalProxyModel.h index 2e073c9..5646a03 100644 --- a/pglab/HorizontalProxyModel.h +++ b/pglab/HorizontalProxyModel.h @@ -1,9 +1,9 @@ #ifndef HORIZONTALPROXYMODEL_H #define HORIZONTALPROXYMODEL_H -#include +#include -class HorizontalProxyModel : public QAbstractProxyModel { +class HorizontalProxyModel : public QIdentityProxyModel { public: HorizontalProxyModel(QObject * parent = nullptr); QModelIndex mapToSource(const QModelIndex &proxyIndex) const; diff --git a/pglab/TablesPage.cpp b/pglab/TablesPage.cpp index 1ba5897..fe99126 100644 --- a/pglab/TablesPage.cpp +++ b/pglab/TablesPage.cpp @@ -7,7 +7,7 @@ #include "ResultTableModelUtil.h" #include "ColumnTableModel.h" #include "ConstraintModel.h" -//#include "NamespaceFilterWidget.h" +#include "HorizontalProxyModel.h" #include "IconColumnDelegate.h" #include "IndexModel.h" #include "SqlFormattingUtils.h" @@ -53,6 +53,10 @@ TablesPage::TablesPage(MainWindow *parent) ui->indexesTable->setItemDelegate(new PgLabItemDelegate(ui->indexesTable)); ui->indexesTable->setItemDelegateForColumn(0, delegate); + HorizontalProxyModel* proxy_model = new HorizontalProxyModel(this); + proxy_model->setSourceModel(m_tablesModel); + ui->tablePropertiesTable->setModel(proxy_model); + //m_namespaceFilterWidget = new NamespaceFilterWidget(this); //ui->verticalLayoutTableView->addWidget(m_namespaceFilterWidget); diff --git a/pglab/TablesPage.ui b/pglab/TablesPage.ui index 4481693..0df84f6 100644 --- a/pglab/TablesPage.ui +++ b/pglab/TablesPage.ui @@ -1,4 +1,4 @@ - + TablesPage @@ -13,7 +13,7 @@ Form - + @@ -38,7 +38,7 @@ - 0 + 3 @@ -90,6 +90,11 @@ Properties + + + + +