Introduced own version of QTableView called PgLabTableView that has some other defaults.
This commit is contained in:
parent
f0ffcf4abd
commit
f6ea2ce0a6
9 changed files with 42 additions and 32 deletions
|
|
@ -6,7 +6,7 @@
|
|||
#include "ProcTableModel.h"
|
||||
#include "SqlCodePreview.h"
|
||||
#include <QApplication>
|
||||
#include <QTableView>
|
||||
#include "PgLabTableView.h"
|
||||
#include <QVBoxLayout>
|
||||
#include <QTabWidget>
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ FunctionsPage::FunctionsPage(QWidget *parent)
|
|||
: QSplitter(Qt::Horizontal, parent)
|
||||
{
|
||||
// create widgets
|
||||
m_functionTable = new QTableView(this);
|
||||
m_functionTable = new PgLabTableView(this);
|
||||
m_detailTabs = new QTabWidget(this);
|
||||
m_definitionView = new SqlCodePreview(this);
|
||||
|
||||
|
|
@ -31,8 +31,6 @@ FunctionsPage::FunctionsPage(QWidget *parent)
|
|||
// setLayout(mainLayout);
|
||||
|
||||
// Do further initialization of widgets and models
|
||||
SetTableViewDefault(m_functionTable);
|
||||
|
||||
m_model = new ProcTableModel(this);
|
||||
m_sortFilterProxy = new CustomFilterSortModel(this);
|
||||
m_sortFilterProxy->setSourceModel(m_model);
|
||||
|
|
@ -40,9 +38,6 @@ FunctionsPage::FunctionsPage(QWidget *parent)
|
|||
m_functionTable->setSortingEnabled(true);
|
||||
m_functionTable->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
|
||||
auto item_delegate = new PgLabItemDelegate(this);
|
||||
m_functionTable->setItemDelegate(item_delegate);
|
||||
|
||||
connect(m_functionTable->selectionModel(), &QItemSelectionModel::currentRowChanged, this,
|
||||
&FunctionsPage::functionTable_currentRowChanged);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue