[Qt-interest] How to use html tags in rich text edit
rain hanatawa119
takashiemo_119 at hotmail.com
Wed Dec 24 12:53:04 CET 2008
Hey there,
I have doubts on getting on how to use html tags on QTextEdit. Currently im working on Qt version 3+ and what i found that only append() method do supports writing and reading html codes properly on the QTextEdit. The problem with append is that it can only insert to the very end of the text edit. But what if i want the string to be inserted at certain cursor position. This is cumbersome...
These are the codes that i have tried on my programs and only append() doing the job properly. Is there any proper way to use html codes? I really need help by now (im new to ruby and qt). Thanx.
def insert_image
fname = Qt::FileDialog.getOpenFileName
#currently insert() doesnt work. So i used append()
self.insert("<img src=\"#{fname}\">", true, true, false)
self.append("<img src=\"#{fname}\">")
end
-Rain-
_________________________________________________________________
Show them the way! Add maps and directions to your party invites.
http://www.microsoft.com/windows/windowslive/events.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081224/ee62b019/attachment.html
More information about the Qt-interest-old
mailing list