CrudTab uses new PgLabItemDelegate, no need anymore for CrudModel to inherit BaseTableModel.
This commit is contained in:
parent
208883462c
commit
a543ccb021
3 changed files with 60 additions and 14 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include "CrudModel.h"
|
||||
#include "MainWindow.h"
|
||||
#include "ResultTableModelUtil.h"
|
||||
#include "PgLabItemDelegate.h"
|
||||
|
||||
|
||||
CrudTab::CrudTab(MainWindow *parent)
|
||||
|
|
@ -13,6 +14,10 @@ CrudTab::CrudTab(MainWindow *parent)
|
|||
ui->setupUi(this);
|
||||
|
||||
SetTableViewDefault(ui->tableView);
|
||||
|
||||
auto delegate = new PgLabItemDelegate(ui->tableView);
|
||||
ui->tableView->setItemDelegate(delegate);
|
||||
|
||||
m_crudModel = new CrudModel(parent);
|
||||
ui->tableView->setModel(m_crudModel);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue