How to add text-decoration under the text in a QTreeWidgetItem?

  • Just like below,

    I have a QTreeWidget, and I want set the text-decoration: underline like css in a QTreeWidgetItem when I hover over it, but qss don't suport the text-decoration, can someone give me any advice?

  • Qt Champions 2018

    In the same slot in which you change the cursor call

    QFont oldFont = treeItem->data(0,Qt::FontRole).value<QFont>();

  • @VRonin Thanks a lot ,, successed.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.