[Qt-interest] Updating the QPlainTextEdit's background color
NoRulez
norulez at me.com
Tue Jul 26 12:52:41 CEST 2011
Hi,
Im trying to set the background color of a QPlainTextEdit as followed:
QPalette pal = palette();
pal.setColor(QPalette::Base, Qt::yellow);
setPalette(pal);
But the background color doesn't change.
I also tried each of the following functions after setPalette(pal);, but
the result is the same (which means that the background color isn't changed)
.) update();
.) repaint();
.) viewport()->update();
So, which method can I call to change the background color immediately.
Thanks in advance
Best Regards
NoRulez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110726/99b7e190/attachment.html
More information about the Qt-interest-old
mailing list