Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
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.
By
Vivek Anand
-
@anandvivek
probably the same issue like in this threadI 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.