Results 1 to 4 of 4

Thread: qt fetch the url of a html

  1. #1
    Join Date
    Oct 2014
    Posts
    13
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default qt fetch the url of a html

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,419
    Thanks
    37
    Thanked 1,546 Times in 1,496 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: джекпот

    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,
    _

  3. #3
    Join Date
    Oct 2014
    Posts
    13
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: джекпот

    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?

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,419
    Thanks
    37
    Thanked 1,546 Times in 1,496 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: джекпот

    If you generate HTML content, there is no URL.

    Cheers,
    _

Similar Threads

  1. How to fetch pixmap from a label
    By Charvi in forum Qt Programming
    Replies: 1
    Last Post: 29th June 2012, 09:16
  2. Fetch default values from MySQL?
    By arimaniac in forum Qt Programming
    Replies: 1
    Last Post: 1st February 2011, 20:36
  3. Fetch millions of records using QtSql
    By mvbhavsar in forum Qt Programming
    Replies: 6
    Last Post: 14th January 2011, 06:10
  4. QMYSQL3: Unable to fetch data
    By crystlrain in forum Qt Programming
    Replies: 2
    Last Post: 11th November 2009, 07:24
  5. QSQLITE Unable to fetch row in create
    By xgoan in forum Newbie
    Replies: 3
    Last Post: 18th October 2006, 14:39

Tags for this Thread

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.