PDA

View Full Version : How can I display XML in Qt??



highlightsong
14th July 2008, 05:06
I have to display XML in Qt.
So, I tried to use QTextBrowser.
But when I look around this site,
some people said it is impossible(In aamer4yu's thread).

What I REALLY know:
1. Is it really impossble?
2. if first question's answer is "Yes", instead of QTextBrowser, what can I use?

aamer4yu
14th July 2008, 05:24
1) Its not impossible... but very tedious.
2) I havent tried QTextBrowser.

What I did was, I modified the Simple DOM Model example. In the model part, I made it return data in one line as a tag instead of multiple columns. Second, I set a Tree view on this, and on the tree view set a delegate to do xml highlighting (xml highlighter).

But this is not as efficient as IE displays it. I dont have the ending tags.</tagName>. And my spacing is not perfect.