Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Display a QAbstractMessageHandler message on a QTextEdit widget.
Forum Updated to NodeBB v4.3 + New Features

Display a QAbstractMessageHandler message on a QTextEdit widget.

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    issam
    wrote on last edited by
    #1

    Hi,
    I would like to debug the result of an XML file validation (against an XML schema) by displaying the messages generated by
    QAbstractMessageHandler on QTextEdit instance instead of using the console. By default the QXmlSchemaValidator write the message on the console (stderr) using some HTML/CSS colors and styles. for example :

    @Error XSDError in file:///home/issam/pfe/project/unnamed.pnml, at line 2, column 69: No definition for element pnml available.
    @

    FODC0002 is coloured in red, line and column numbers in blue, pnml word in blue ....

    But when i use the QTextEdit the message is displayed without colors, only the black is used !

    The raw message is :
    @
    "<html ><body><p>No definition for element <span class='XQuery-keyword'>pnml</span> available.</p></body></html>"
    @

    How to display the message on QTextEdit as it was displayed on the terminal ?

    Thanks in advance. :)

    http://www.iissam.com/

    1 Reply Last reply
    0
    • B Offline
      B Offline
      brlebtag
      wrote on last edited by
      #2

      try this:

      http://qt-project.org/doc/qt-4.8/qtextedit.html

      qtextEdit.insertHtml(erro_report);

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved