QListWidget Item hover stylesheet

  • Hi,
    I have QListwidget, if I do mouse hover on listwidget items the text should be display with underline. Like Qt welcome page recent projects list. I have tried QListWidget::item:hover {text-decoration: underline;}, but it is not working. Give me some solution.
    Thanks in advance.
    Vivek Anand

  • Moderators

    probably the same issue like in this thread

    I suggest you go the item delegate way and check the state for QStyle::State_MouseOver and set the font underlined (QFont::setUnderline(true)).

  • Thanks for your suggestion. I will try this one.

Log in to reply

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