Hi, I have several QTextEdit widgets. I have no Idea on how to set the background colors. In Qt3 I used I have looked at designer, Qt3 to Qt4 docs. the Qt4 demos, and am still at a loss.
Any help would be most appreciated.
Printable View
Hi, I have several QTextEdit widgets. I have no Idea on how to set the background colors. In Qt3 I used I have looked at designer, Qt3 to Qt4 docs. the Qt4 demos, and am still at a loss.
Any help would be most appreciated.
setBackgroundRole(QPalette::ColorRole role) in QWidget
Thanks for the prompt reply, but still have a problem.
I am using designer.so enteredwhen I compiled I gotCode:
ui.helpBox->setPalette(p);.
Line 167 is the ui.helpBox->setPalette(p);Quote:
edpform.cpp:167: error: expected primary-expression before ‘.’ token
so I went back in designer and opened the "palette" in the Property Editor for the helpBox ( QTextEdit Widget ). I was able to change the color there, but I want to change the background color from within the program.
thanks
There's a dot after semicolon --- remove it.Quote:
Originally Posted by impeteperry
boy you have better eyes then I do ( 80 years old ) thanks a million
You meant 80 years young dud... :pQuote:
Originally Posted by impeteperry
Ain't ready to quit yet. Maybe I'll get it right next year.
Thanks to you and all your buddies @ Qt Centre.
Try using QPalette::Text:
Quote:
The foreground color used with Base. This is usually the same as the WindowText, in which case it must provide good contrast with Window and Base.