| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 6 | |
hi there! im trying to get use of QTextEdit::getStyleSheet. im
trying to do something like that:
display->setStyleSheet(".your { background: #ffffff; } .user {
background: #e0e0e0; }");
and than in QTextEdit im appending "<table
class=\"user\"><tr><td>test</td></tr></table>" but table has white
background. Any sugestions how to make use of that?
--
[ signature omitted ]
On Friday 28. July 2006 17:24, naresh@xxxxxxx wrote:
> hi there! im trying to get use of QTextEdit::getStyleSheet. im
> trying to do something like that:
>
> display->setStyleSheet(".your { background: #ffffff; } .user {
> background: #e0e0e0; }");
>
> and than in QTextEdit im appending "<table
> class=\"user\"><tr><td>test</td></tr></table>" but table has white
> background. Any sugestions how to make use of that?
Note that styleSheet is a property of QWidget and affects the widget's look.
You may want to try the defaultStyleSheet property on the textedit's document
instead.
The background shorthand property is not currently supported, so you have to
use the explicit background-color property instead. (I'll see about fixing
that for 4.2 though)
With these two changes your example works fine for me.
Simon
Attachment:
Attachment:
pgpnGFhXowbE2.pgp
Description: PGP signature