Fix weight adding in the Qt UI & fix the header height for tables

Fixes #203

Signed-off-by: Patrick Valsecchi <patrick@thus.ch>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Patrick Valsecchi 2013-10-01 15:52:23 +02:00 committed by Dirk Hohndel
parent 1524b1a0ae
commit f02b5e5d90
3 changed files with 5 additions and 4 deletions

View file

@ -34,6 +34,8 @@ DiveListView::DiveListView(QWidget *parent) : QTreeView(parent), mouseClickSelec
setSortingEnabled(false);
setContextMenuPolicy(Qt::DefaultContextMenu);
header()->setContextMenuPolicy(Qt::ActionsContextMenu);
const QFontMetrics metrics(defaultModelFont());
header()->setMinimumHeight(metrics.height() + 10);
QAction *showSearchBox = new QAction(tr("Show Search Box"), this);
showSearchBox->setShortcut( Qt::CTRL + Qt::Key_F);
showSearchBox->setShortcutContext(Qt::ApplicationShortcut);