diff options
Diffstat (limited to 'src/historydialog.cpp')
-rw-r--r-- | src/historydialog.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/historydialog.cpp b/src/historydialog.cpp index da1c5858..f4aea3bb 100644 --- a/src/historydialog.cpp +++ b/src/historydialog.cpp @@ -69,13 +69,16 @@ HistoryDialog::HistoryDialog(QWidget *parent, HistoryManager *setHistory) m_historyWidg->tree->setAlternatingRowColors(true); QFontMetrics fm(font()); - int header = fm.width(QLatin1Char('m')) * 40; + int header = fm.width(QLatin1Char('m')) * 30; m_historyWidg->tree->header()->resizeSection(0, header); m_historyWidg->tree->header()->setStretchLastSection(true); - connect(m_historyWidg->tree, SIGNAL(activated(const QModelIndex&)), this, SLOT(open())); + m_historyWidg->tree->setContextMenuPolicy(Qt::CustomContextMenu); + connect(m_historyWidg->tree, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(customContextMenuRequested(const QPoint &))); + + connect(m_historyWidg->tree, SIGNAL(activated(const QModelIndex&)), this, SLOT(open())); } |