QListWidget Background Color not on Scrollbar

  • Hello there

    Im trying to make a Gui with a ListView (ListWidget?) and wanted to set a background Color. This now looks like this:

    alt text

    How can i make the Background-Color only apply on the Actual Background, but not on the Scrollbar on the right?

    Hope someone can help me

  • Lifetime Qt Champion

    if you used a stylesheet , you most likely made it too broad.
    Try using a name like
    QWidget#mylist { background-color: rgb(0, 170, 255); }

    (rename the list to mylist)
    Then it does like this
    alt text

  • Hello

    Yes, i just made Rightclick on in and clicked on "Change Stylesheet". Copied your solution in, and it works. Thx for th e help

  • Lifetime Qt Champion

    Super :)
    Stylesheets are cascading and will affect all if you don't specify type or name.

Log in to reply

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