From 6d4aca1786ad21e8781791b6c266d9b115d18ac9 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 1e95f8f44..f3252dc8e 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); } }