PDA

View Full Version : qt fetch the url of a html



sRB
17th December 2014, 06:10
Hi all
I have a qt application in which I have a QTreewidget that displays some content in the QTextBrowser. I set the contents for the html document in the textbrowser using the setHtml() function. All I want now is to fetch the url of this html document so that I could use it later somewhere in my application.

In my case I have a huge QString that is passed to setHtml() to display the html document. I donot have any path or url using which I do the setSource(). So If I have to reference the links present in the html document from outside this will not be possible right?

I looked around a lot but all in vain. I hope someone could help me with it.

anda_skoa
17th December 2014, 09:16
Your text is quite confusing.

What does the QTreeWidget have to do with anything else?

You generate some HTML text and it should magically have an URL associated?

Cheers,
_

sRB
17th December 2014, 09:25
Hello,
I just presented my usecase. Nothing's got to do with Qtreewidget, just that when i click on any tree item my textbrowser content changes.

But my main concern is How do i fetch th URL?

anda_skoa
17th December 2014, 09:39
If you generate HTML content, there is no URL.

Cheers,
_