Results 1 to 3 of 3

Thread: Editing HTML file

  1. #1
    Join Date
    Feb 2014
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Editing HTML file

    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...!

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Editing HTML file

    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.

  3. #3
    Join Date
    Feb 2014
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Editing HTML file

    Quote Originally Posted by ChrisW67 View Post
    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 !

Similar Threads

  1. html editing issue
    By sujan.dasmahapatra in forum Qt Programming
    Replies: 2
    Last Post: 1st July 2013, 00:47
  2. File Editing (Binary/Hex) with Qt 4.6.2
    By RH-00 in forum Qt Programming
    Replies: 3
    Last Post: 8th October 2010, 21:58
  3. Editing the file using the seek operations
    By grsandeep85 in forum Qt Programming
    Replies: 4
    Last Post: 24th March 2010, 05:30
  4. editing *.pro file in Visual Studio
    By estel in forum Newbie
    Replies: 2
    Last Post: 8th February 2010, 07:31
  5. Editing a file in Qt4
    By grsandeep85 in forum Qt Programming
    Replies: 3
    Last Post: 22nd December 2009, 10:33

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.