aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r--qt-ui/maintab.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index b8b53e998..63cbd6181 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -26,7 +26,7 @@
#include <QScrollBar>
MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
- weightModel(new WeightModel()),
+ weightModel(new WeightModel(this)),
cylindersModel(CylindersModel::instance()),
editMode(NONE)
{
@@ -83,8 +83,8 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
connect(ui.cylinders->view(), SIGNAL(clicked(QModelIndex)), this, SLOT(editCylinderWidget(QModelIndex)));
connect(ui.weights->view(), SIGNAL(clicked(QModelIndex)), this, SLOT(editWeightWidget(QModelIndex)));
- ui.cylinders->view()->setItemDelegateForColumn(CylindersModel::TYPE, new TankInfoDelegate());
- ui.weights->view()->setItemDelegateForColumn(WeightModel::TYPE, new WSInfoDelegate());
+ ui.cylinders->view()->setItemDelegateForColumn(CylindersModel::TYPE, new TankInfoDelegate(this));
+ ui.weights->view()->setItemDelegateForColumn(WeightModel::TYPE, new WSInfoDelegate(this));
ui.cylinders->view()->setColumnHidden(CylindersModel::DEPTH, true);
completers.buddy = new QCompleter(BuddyCompletionModel::instance(), ui.buddy);
completers.divemaster = new QCompleter(DiveMasterCompletionModel::instance(), ui.divemaster);