PDA

View Full Version : Css - problem with border in QTextEdit



Trok
28th March 2009, 17:54
Hi, I have a problem with border in Css. It's my code:


ui->textEdit->setHtml("<div style=\"border: 1px solid black; background-color: green\">text</div>");

The problem is that background color gets green, but border doesn't appears.
What's wrong?

Lykurg
28th March 2009, 18:31
Border is not supported! Look here (http://doc.trolltech.com/4.5/richtext-html-subset.html)

Trok
28th March 2009, 22:25
Yes, it's true, but when I used border-color and border-style in style='' i hadn't correct results. I have next attention to your last post. If I used border: in setStyleSheet() function, it was correctly for object ( border was created).

wysota
28th March 2009, 22:53
The widget stylesheet mechanism and Qt richtext CSS are two different stories and a completely different subset of CSS is supported in each of them.