QListView Stylesheet Question

  • So currently i have a QListView, and i have ve set its stylesheet to

    QListView::item {border: 0px solid black; padding-left: 5px}"
    "QListView::text { left: 25px }"
    "QListView::text:!selected { left: 25px }"
    "QListView::text:selected { left: 25px }"
    "QListView::icon {spacing: 15px }"

    And because of that it looks like this

    That is how i want it to look, except for the icons are not correct size. But when i mouse over it it transforms to


    as you can see in the second image, the icons are not aligned and neither is the text. How can i get the text and icons to permanently be aligned?

  • Moderators

    Do you have any additional stylesheet set for a widget in the parent hierarchy?
    Because the posted stylesheet of yours shouldn't result in this effect.

Log in to reply

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