[Qt-interest] How to change QProgressDialog's Color

Ta-Cheng Lin tclin1998 at gmail.com
Tue Sep 15 05:59:56 CEST 2009


Hi:

If i do this

  // Create the progressbar
    progress = new QProgressBar( 100, this );
    //    progress->setPaletteBackgroundColor("red");
    progress->setPaletteForegroundColor("green");

The color of the progress bar is still black not green, is there anything
I need to set?

Thanks!

-Todd


On Sun, Sep 13, 2009 at 11:57 PM, R. Reucher <rene.reucher at batcom-it.net>wrote:

> On Sun, 13 Sep 2009 20:24:38 -0700, Ta-Cheng Lin wrote:
> > The default bar's color is black,
> > How to change the bar's color?
> Either create a new QProgressBar (on the heap), set the appropriate
> attributes (i.e. colors) and set the QProgressDialog's bar with
> QProgressDialog::setBar(QProgressBar *) -- or use a different style /
> style sheet (for the whole application or the QProgressDialog instance).
> --
> René Reucher
> rene.reucher at batcom-it.net
> http://www.batcom-it.net/
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>



--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090914/abe225bb/attachment.html 


More information about the Qt-interest-old mailing list