[Qt-interest] setting background color of QMessageBox
Chandru...
sekarwagmare at gmail.com
Sat May 23 13:34:31 CEST 2009
yeah i got my mistake ... how to set the color of text button in QMessageBox
globally ...
On Sat, May 23, 2009 at 5:02 PM, Oliver Demetz <
forenbeitraege at oliverdemetz.de> wrote:
> Hi
>
> You're not using the messagebox that you specified the stylesheet for.
> QMessageBox msgBox;
> msgBox.setStyleSheet(QString::fromUtf8("background-color: rgb(241, 241,
> 241);"));
> int ret = msgBox.warning(...)
>
>
> Chandru... schrieb:
> >
> > hi friends,
> > i am using QMessageBox to dispaly warning if the user press a pushButton
> ..
> > i coded like this:
> >
> > -- QMessageBox msgBox;
> > msgBox.setStyleSheet(QString::fromUtf8("background-color:
> > rgb(241, 241, 241);"));
> >
> > int ret = QMessageBox::warning(this, tr("My Application"),
> > tr("<font color = red >Are you sure you
> > want to quit?.\n"
> > "Shut Down key is pressed </font >"),
> > QMessageBox::Ok | QMessageBox::Cancel);
> >
> > switch (ret) {
> > case QMessageBox::Ok :
> > qApp->quit();
> > break;
> >
> > case QMessageBox::Cancel :
> > break;
> >
> > default :
> > break;
> >
> > }
> > rendered using the default stylesheet of app .. it is pure black in
> > background color ..
> > the text are not visible ... so i use <font > in constructor of
> > QMessage::warning ..
> >
> > but i cant set font color of buttons ... yes , no text were not visible
> ...
> >
> > i try change the background color of QMessageBox .. but QPalette and
> > StyleSheet is not working ... please help ...
> > how to set backgroud color or color of the text in
> > QMessage::standardButton() ..
> >
> > WAGMARE
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-interest
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
--
WAGMARE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090523/95c164dd/attachment.html
More information about the Qt-interest-old
mailing list