Results 1 to 2 of 2

Thread: QTextEdit problem

  1. #1
    Join Date
    Mar 2006
    Posts
    29
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QTextEdit problem

    Hi All


    I have placed one QTextEdit Control in my Form. In that Control i want to display one link , for example "www.example.html".

    So I gave the statement

    txtEditObj->setHtml("www.example.html");

    It works fine. but after that i want to edit the text. if i give any inputs it also looks like "LINK". QTextEdit control becomes entirley to HTML format.

    What can i do

    Looking forward your reply
    Thanks and regards
    vijay

  2. #2
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QTextEdit problem

    QTextEdit control becomes entirley to HTML format.
    That is becuase you are using setHtml().

    Try:

    setHtml("<a href = \"#\">www.example.com</a>");

Similar Threads

  1. setting cursor problem in QTextEdit
    By jyoti kumar in forum Qt Programming
    Replies: 3
    Last Post: 19th May 2006, 08:17
  2. QTextEdit API questions (plain text)
    By Gaspar in forum Qt Programming
    Replies: 4
    Last Post: 16th May 2006, 06:03
  3. Replies: 16
    Last Post: 7th March 2006, 15:57
  4. Painting to QTextEdit
    By gesslar in forum Qt Programming
    Replies: 8
    Last Post: 18th February 2006, 18:40
  5. Problem with inserting text into QTextEdit
    By xorrr in forum Qt Programming
    Replies: 0
    Last Post: 6th February 2006, 11:45

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.