Results 1 to 3 of 3

Thread: QTextEdit and toHtml()

  1. #1
    Join Date
    Apr 2011
    Posts
    195
    Thanks
    49
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default QTextEdit and toHtml()

    Hi guys,
    I have a question about QTextEdit and toHtml().
    I use QTextEdit to format some text (bold, italic, underline, ...). If I get the html code, there are inline styles in the html-code.

    Now I want to know, if I can manipulate the output and use css classes for the formatting?

    thanks

  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: QTextEdit and toHtml()

    You can manipulate the HTML any way you like.

  3. #3
    Join Date
    Apr 2011
    Posts
    195
    Thanks
    49
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QTextEdit and toHtml()

    I know, but the QString I get from toHtml() is not manipulable.
    Will say: I want that there is a <b> tag for bold formatting, instead of an inline stylesheet.

Similar Threads

  1. nested lists in QTextDocumentFragment::toHtml()
    By Al_ in forum Qt Programming
    Replies: 0
    Last Post: 2nd March 2012, 09:16
  2. QTextEdit and toHtml()
    By prof.ebral in forum Newbie
    Replies: 1
    Last Post: 27th June 2010, 15:16
  3. QTextEdit
    By veda in forum Qt Programming
    Replies: 4
    Last Post: 11th September 2007, 07:30
  4. Replies: 1
    Last Post: 16th February 2007, 07:22
  5. QTextEdit::toHtml()
    By lewis in forum Qt Programming
    Replies: 3
    Last Post: 20th July 2006, 14:31

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.