Results 1 to 6 of 6

Thread: [Qt 4.1]using html in QTextEdit from designer

  1. #1
    Join Date
    Jan 2006
    Posts
    46
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default [Qt 4.1]using html in QTextEdit from designer

    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:

    Qt Code:
    1. <a href="http://link.to.site"> Click here </a>
    To copy to clipboard, switch view to plain text mode 
    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

  2. #2
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [Qt 4.1]using html in QTextEdit from designer

    void setHtml ( const QString & text ) might be what you're looking for

  3. #3
    Join Date
    Jan 2006
    Posts
    46
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [Qt 4.1]using html in QTextEdit from designer

    Quote Originally Posted by yop
    void setHtml ( const QString & text ) 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?

  4. #4
    Join Date
    Jan 2006
    Posts
    46
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [Qt 4.1]using html in QTextEdit from designer

    anyone please?

    thanx

    Pat

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [Qt 4.1]using html in QTextEdit from designer

    Did you try pasting that HTML into a cell in "Property Editor"?

  6. #6
    Join Date
    Jan 2006
    Posts
    46
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re:[SOLVED] [Qt 4.1]using html in QTextEdit from designer

    thanx, that was it

Similar Threads

  1. Html used in QTextEdit and QTextDocument
    By nifei in forum Qt Programming
    Replies: 5
    Last Post: 15th August 2012, 21:38
  2. Replies: 2
    Last Post: 24th January 2009, 19:30
  3. QTextEdit and Html
    By giusepped in forum Qt Programming
    Replies: 1
    Last Post: 28th October 2008, 18:20
  4. Load HTML to QTextEdit
    By Gamalof in forum Qt Programming
    Replies: 2
    Last Post: 5th July 2008, 19:08
  5. QTextEdit produces incorrect html
    By ccf_h in forum Qt Programming
    Replies: 5
    Last Post: 8th February 2006, 16:18

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.