Nominate our 2022 Qt Champions!

QTreeWidget - Changing the width of the selection rect of an item

  • Hi,
    It's about the selection rect width when passing the mouse over a tree widget item.
    Is it possible to easily change this width using qss?
    By default, the hover rect is always displayed with a left margin.
    I'd like a selection rect covering all the width of the tree widget, whatever the item depth.
    Thank you for your answers.

  • I think it will not work with qss.
    The element is typically selected in the text area, the area before is the decoration area. To change this, you have to program the stuff....

  • Hi Gerolf,

    Thank you for this quick answer.
    So let's programing ...


Log in to reply