From ca471e99861e84c4d4a19d6ac73748e538546c0d Mon Sep 17 00:00:00 2001 From: Andrew Meyer Date: Sun, 16 Feb 2020 01:57:36 -0500 Subject: [PATCH] Display database path in root group tooltip When mousing over the root group entry, show the file path for the current database. Fixes #4038 --- src/gui/group/GroupModel.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui/group/GroupModel.cpp b/src/gui/group/GroupModel.cpp index d3f2f40f6..a9b61315d 100644 --- a/src/gui/group/GroupModel.cpp +++ b/src/gui/group/GroupModel.cpp @@ -142,6 +142,13 @@ QVariant GroupModel::data(const QModelIndex& index, int role) const font.setStrikeOut(true); } return font; + } else if (role == Qt::ToolTipRole) { + QString tooltip; + if (!group->parentGroup()) { + // only show a tooltip for the root group + tooltip = m_db->filePath(); + } + return tooltip; } else { return QVariant(); }