Skip to content

Commit

Permalink
Add Tooltip to TOC
Browse files Browse the repository at this point in the history
Elided item text is expanded here.
  • Loading branch information
ShaopengLin authored and kelson42 committed Nov 13, 2024
1 parent 418f3e4 commit 36a2782
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/tableofcontentbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ QTreeWidgetItem* createChildItem(QTreeWidgetItem* parent, const QString& childNo
item->setExpanded(true);

const auto display = childNo + " " + headerObj["text"].toString();
item->setToolTip(0, display);
item->setData(0, Qt::DisplayRole, display);
item->setData(0, Qt::FontRole, QFont("Selawik", 12));
item->setData(0, Qt::UserRole, headerObj["anchor"].toString());
Expand Down

0 comments on commit 36a2782

Please sign in to comment.