Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QListWidget Background Color not on Scrollbar
Forum Updated to NodeBB v4.3 + New Features

QListWidget Background Color not on Scrollbar

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 1.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Aroc
    wrote on 24 Dec 2016, 14:18 last edited by
    #1

    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

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 24 Dec 2016, 14:44 last edited by
      #2

      Hi
      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

      1 Reply Last reply
      2
      • A Offline
        A Offline
        Aroc
        wrote on 24 Dec 2016, 14:47 last edited by
        #3

        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

        M 1 Reply Last reply 24 Dec 2016, 14:50
        0
        • A Aroc
          24 Dec 2016, 14:47

          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

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 24 Dec 2016, 14:50 last edited by
          #4

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

          1 Reply Last reply
          0

          1/4

          24 Dec 2016, 14:18

          • Login

          • Login or register to search.
          1 out of 4
          • First post
            1/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved