Results 1 to 6 of 6

Thread: Scrollbar background does not go solid (?) when using stylesheets

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2008
    Posts
    26
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Scrollbar background does not go solid (?) when using stylesheets

    As shown in the image attached, the following code gives me a scrollbar with a dotted background. I would like to make that background solid, but I can't seem to make Qt do that using the stylesheet mechanism.

    I was wondering if someone knows if this is either a bug, if it's supposed to work like this or if there's a work-around.

    I'm using Windows Vista, if that matters (I've noticed some other different behaviors as well, using Vista and Qt styles, that's why I mention it).

    Qt Code:
    1. QScrollBar:horizontal {
    2. background-color: blue;
    3. border: 1px solid black;
    4. margin: 0px 16px 0px 16px;
    5. }
    6.  
    7. QScrollBar::handle:horizontal {
    8. background: red;
    9. border: 1px solid yellow;
    10. }
    11.  
    12. QScrollBar::add-line:horizontal {
    13. border: 1px solid black;
    14. background: purple;
    15. width: 16px;
    16. subcontrol-position: right;
    17. subcontrol-origin: margin;
    18. }
    19.  
    20. QScrollBar::sub-line:horizontal {
    21. border: 1px solid black;
    22. background: purple;
    23. width: 16px;
    24. subcontrol-position: left;
    25. subcontrol-origin: margin;
    26. }
    To copy to clipboard, switch view to plain text mode 
    Attached Images Attached Images

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.