PDA

View Full Version : [Qt 4.1]using html in QTextEdit from designer



patcito
16th January 2006, 16:17
Hey all,
I want to enter some html text in my QEditText from designer but I can't make it work. As an example when I enter:


<a href="http://link.to.site"> Click here </a>
Qt displayd the html code instead of the HTML link. Any idea how to write HTML code in a QTextEdit from designer and make it display the right thing instead of the code? it looks like I'm forced to use the rich text editor from designer.

Thanx in advance

Patcito

yop
16th January 2006, 16:26
void setHtml ( const QString & text ) (http://doc.trolltech.com/4.1/qtextedit.html#html-prop) might be what you're looking for

patcito
16th January 2006, 16:31
void setHtml ( const QString & text ) (http://doc.trolltech.com/4.1/qtextedit.html#html-prop) might be what you're looking for

thanx but i already knew about that, I was just looking for a way to do it from designer, you know when you right-click on the QTextEdit and select "Change HTML..." it looks like I can't write html code in there. See what I mean?

patcito
16th January 2006, 23:13
anyone please?

thanx

Pat

jacek
16th January 2006, 23:22
Did you try pasting that HTML into a cell in "Property Editor"?

patcito
16th January 2006, 23:36
thanx, that was it