I have an QDialog
that contains a QTextBrowser
, this dialogs only feature is to display an XML document in the QTextBrowser
. The QDialog
takes a std::string
as a parameter and then using QXmlStreamReader
and QXmlStreamWriter
it converts that string into a "pretty print" formatted xml string and then sets that string to the QTextBrowser
on the UI.
This is all working fine but ideally i would like to be able to click on the open/close tags and have it do some clever highlighting, also be able to collapse and expand tags, essentially what im looking for is the same functionality as Notepad++ when in XML mode.
Im wondering if anyone knows of any Qt C++ compatible libraries that accomplish this or if there is anything in Qt itself that may have this functionality (although i have had a good look and cant find anything).
Note: This QTextBrowser
is simply displaying the XML it is set to read only so no editing it required i simply need this functionality for viewing only (if that makes a difference)
Any suggestions welcomed cheers
No comments:
Post a Comment