[Qt-interest] What is Qt's default style for QScrollBar
Jens Bache-Wiig
jensbw at gmail.com
Wed Jun 16 16:31:10 CEST 2010
If you set the style sheet on a parent, a child widget cannot
regain the native look. However you can work around this by
only setting the style sheet directly on the scrollbars in the
QScrollArea. Alternatively you can use the ID
selector QScrollBar#myobjectname{} to only affect the
scrollbars you want to modify.
See here for other ways you can limit the application of
style sheets:
http://doc.trolltech.com/4.6/stylesheet-syntax.html
Jens
> My requirement is that, QScrollArea should take parent stylesheet where
> as QScrollBar dont.
>
> So in QScrollArea class I would like to set the stylesheet to QScrollBar
> as follows:
> * QScrollBar* vScrollBar = QAbstractScrollArea::verticalScrollBar ();
> vScrollBar->setStyleSheet("background-color:blue;"); // Need to know
> Qt-default style
>
> *My query is that, what Qt-by default sets to the QScrollBar, so that I
> can duplicate here as it is.
> Since the above style is not looking good and it is not consistent with
> other QScrollBar styles of my application
>
> --
> ----------------------------------------------------
> Y Santhosh Kumar -
> Senior Software Engineer,
> SoftJin Technologies Pvt Ltd,
> www.softjin.com
> ----------------------------------------------------
>
>
> Business Disclaimer
> ____________________________________________________________
> This e-mail message and any files transmitted with it are intended solely
> for the use of the individual or entity to which they are addressed. It
> may contain confidential, proprietary or legally privileged information.
> If you are not the intended recipient please be advised that you have
> received this message in error and any use is strictly prohibited. Please
> immediately delete it and all copies of it from your system, destroy any
> hard copies of it and notify the sender by return mail. You must not,
> directly or indirectly, use, disclose, distribute, print, or copy any part of
> this message if you are not the intended recipient.
> ___________________________________________________________
More information about the Qt-interest-old
mailing list