Hi all,
Can some body explain how to set the back ground color of QLineEdit? By default it appears white, how to change it to gray?
Thanks in advance,
Seema Rao
Hi all,
Can some body explain how to set the back ground color of QLineEdit? By default it appears white, how to change it to gray?
Thanks in advance,
Seema Rao
Please try to search the forums before asking:
http://www.qtcentre.org/forum/showthread.php?t=2196#3
J-P Nurmi
Play with setPalette and setBackgroundRole or search in forum, there were many threads alike this
a life without programming is like an empty bottle
If you are using Qt 4.2 you can take advantage of the Qt Style Sheets:
Qt Code:
To copy to clipboard, switch view to plain text mode
... and at least one of your concerns have been gone in a second ...
Just a heads up: I used the 4.1.3 and previous designers to set the pallete for about 40 lineedits. My problem was that when they were disabled the users were complaining that the content was hard to read. So, I set the "disabled" palette to show BLACK text, not grey. When I upgraded to 4.2.1 and then 4.2.2 I could no longer compile my app because I was generating errors:
which support said was due to:"e:\hap2006\ui_homestead.h(6380):
fatal error C1509: compiler limit : too many exception handler states
in function 'Ui_homesteadUi::setupUi'. simplify function"
It seems that Trolltech was creating an entire palette set for each control, and when it got up to around 1600 sets MSVC++ 2003 couldn't handle it any more.It is because in your ui file you change a lot of palettes and fonts and
the generated code creates a brush for each of the roles in the
palette. Since you change a lot of them it hits a limit with the
MSVC compiler which is why it does not build.
This has been posted with Qt and the support staff told me it would be in the next release:
Bookmarks