Results 1 to 1 of 1

Thread: How do I get all the urls going to be read?

  1. #1
    Join Date
    Aug 2017
    Posts
    7
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Windows

    Default Re: How do I get all the urls going to be read?

    I'd like to get the URL which is going to be processed by the browser before it's done, the closest I got was acceptNavigationRequest() that works for frames but for something more specific, for example, a image file is going to be read, that method is obviously not called. I found that finished() has those URLS I'm looking for, but it's show when the URL is ready, I want it before it's going to be ready, like acceptNavigationRequest() does.

    The closest I got so far was override acceptNavigationRequest():

    Qt Code:
    1. class webPage : public QWebPage
    2. {
    3. Q_OBJECT
    4.  
    5. bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type)
    6. {
    7. qDebug() << "url = " << request.url();
    8. return true;
    9. }
    10.  
    11. }
    To copy to clipboard, switch view to plain text mode 


    Added after 1 44 minutes:


    Found the way by overriding QNetworkAccessManager::createRequest()
    Last edited by MacAssembly; 9th September 2017 at 22:44.

Similar Threads

  1. Replies: 0
    Last Post: 8th September 2011, 20:21
  2. Replies: 1
    Last Post: 21st April 2011, 07:19
  3. Does QMediaPlayer work with URLs in QT 4.7.0 and QT mobility 1.1?
    By Gajendra in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 24th February 2011, 06:22
  4. Allows HTML urls in QTableWidget and QLabel
    By petrusPL in forum Newbie
    Replies: 1
    Last Post: 9th January 2011, 13:28
  5. Replies: 1
    Last Post: 3rd December 2009, 11:15

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
  •  
Qt is a trademark of The Qt Company.