PDA

View Full Version : Editing HTML file



neutron
12th February 2014, 15:37
Hi,
I have a problem with Highlighting the points in QTextBrowser.
how can I change the color of the text of particular line( of multiple lines) in HTML file when a Pushbutton from a mainwindow.ui file is clicked in Qt Designer.

I tried using QTextbrowser, but that is not dynamic ! Say, if there are 10 points(lines) in the file, I created 10 html files(making one line red in color in each file )
and called each of them using switch statement on pressing the pushbutton.

I'm using Qt 4 on windows
I'm a month old Qt user, any guidance on this will be a great help to me....!
Thanks in advance...!:)

ChrisW67
12th February 2014, 20:51
QTextBrowser is-a QTextEdit. It displays the content of a QTextDocument that you can manipulate with QTextCursor. Start by reading the Rich Text parts of the manual and the Syntax highlighter example, both linked from the QTextEdit page.

neutron
13th February 2014, 08:43
QTextBrowser is-a QTextEdit. It displays the content of a QTextDocument that you can manipulate with QTextCursor. Start by reading the Rich Text parts of the manual and the Syntax highlighter example, both linked from the QTextEdit page.

Ok Thanks ! I'll go through that example and try out !
Thank you for quick reply ! :)