The Ultimate Qt Community site
Home News Forum Wiki Contest FAQ Links

Go Back   Qt Centre Forum > Qt > Qt Tools

Qt Tools Issues related to using tools bundled or closely related to Qt - i.e. Designer, Creator, Linguist.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 19th March 2008, 15:45
Stukfruit Stukfruit is offline
Novice
 
Join Date: Feb 2008
Qt products used: Qt4
Qt platforms used: Unix/X11 , Windows
Posts: 26
Thanks: 1
Thanked 0 Times in 0 Posts
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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
QScrollBar:horizontal {
    background-color: blue;
    border: 1px solid black;
    margin: 0px 16px 0px 16px;
}
 
QScrollBar::handle:horizontal {
    background: red;
    border: 1px solid yellow;
}
 
QScrollBar::add-line:horizontal {
    border: 1px solid black;
    background: purple;
    width: 16px;
    subcontrol-position: right;
    subcontrol-origin: margin;
}
 
QScrollBar::sub-line:horizontal {
    border: 1px solid black;
    background: purple;
    width: 16px;
    subcontrol-position: left;
    subcontrol-origin: margin;
}
Attached Images
File Type: png scrollbackground.png (740 Bytes, 11 views)
Reply With Quote
  #2  
Old 19th March 2008, 20:46
jpn jpn is offline
Guru
 
Join Date: Feb 2006
Location: Tampere, Finland
Qt products used: Qt4
Qt platforms used: Unix/X11 , Windows
Posts: 6,128
Thanks: 36
Thanked 1,378 Times in 1,318 Posts
Default Re: Scrollbar background does not go solid (?) when using stylesheets

What if you preview it in a different style, like plastique?
__________________
J-P Nurmi
Reply With Quote
  #3  
Old 19th March 2008, 21:21
Stukfruit Stukfruit is offline
Novice
 
Join Date: Feb 2008
Qt products used: Qt4
Qt platforms used: Unix/X11 , Windows
Posts: 26
Thanks: 1
Thanked 0 Times in 0 Posts
Default Re: Scrollbar background does not go solid (?) when using stylesheets

Interesting! I didn't test all styles because I assumed they would all give the same results after I tried a few, but it appears that both the Motif and CDE styles are the only styles with correct and solid colored backgrounds for the scrollbar. The rest don't (Windows, Windows XP, Windows Vista, Cleanlooks, Plastique, ..)

I guess we're looking at a bug here?
(I'm using the snapshot from March 19th, by the way)

Last edited by Stukfruit; 19th March 2008 at 21:35.
Reply With Quote
  #4  
Old 20th March 2008, 12:01
jpn jpn is offline
Guru
 
Join Date: Feb 2006
Location: Tampere, Finland
Qt products used: Qt4
Qt platforms used: Unix/X11 , Windows
Posts: 6,128
Thanks: 36
Thanked 1,378 Times in 1,318 Posts
Default Re: Scrollbar background does not go solid (?) when using stylesheets

Quote:
Originally Posted by Stukfruit View Post
I guess we're looking at a bug here?
(I'm using the snapshot from March 19th, by the way)
I guess so, I suggest you send your findings at Qt4-preview-feedback Mailing List.
__________________
J-P Nurmi
Reply With Quote
The following user says thank you to jpn for this useful post:
Stukfruit (20th March 2008)
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 00:17.


Powered by vBulletin Version 3.7.4 Copyright ©2000 - 2009, Jelsoft Enterprises Ltd., vRewrite 1.5 SEOed URLs completed by Tech Help Forum and Chalo Na.
© 2006–2009 Qt Centre - The Ultimate Qt Community site
Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.