From fe978e17119dd602b71474145e5a30fa86c9db1b Mon Sep 17 00:00:00 2001 From: ShaopengLin Date: Thu, 7 Nov 2024 02:34:55 -0500 Subject: [PATCH] Add Tooltip to TOC Elided item text is expanded here. --- src/tableofcontentbar.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tableofcontentbar.cpp b/src/tableofcontentbar.cpp index 969340f8..ba7440dd 100644 --- a/src/tableofcontentbar.cpp +++ b/src/tableofcontentbar.cpp @@ -51,6 +51,7 @@ void populateItem(const QJsonArray& headerArray, QTreeWidgetItem* parent) item->setData(0, Qt::DisplayRole, display); item->setData(0, Qt::FontRole, QFont("Selawik", 12)); item->setData(0, Qt::UserRole, header["anchor"].toString()); + item->setToolTip(0, display); populateItem(header["child"].toArray(), item); } }