Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QWebview does not load all pages?
Forum Updated to NodeBB v4.3 + New Features

QWebview does not load all pages?

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 1.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GCDX
    wrote on last edited by
    #1

    Hello,

    I tried loading http://nusmods.com/timetable/sem-1 but it doesn't work if i load into my QWebview.
    Even if i used this,
    ui->webView->load(QUrl("http://www.google.com"));

    and try to navigate to the webpage it also won't load?

    Can someone explain the cause and solution to this?

    raven-worxR 1 Reply Last reply
    0
    • G GCDX

      Hello,

      I tried loading http://nusmods.com/timetable/sem-1 but it doesn't work if i load into my QWebview.
      Even if i used this,
      ui->webView->load(QUrl("http://www.google.com"));

      and try to navigate to the webpage it also won't load?

      Can someone explain the cause and solution to this?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @GCDX
      both links you provided redirect to https, so i guess you are missing the OpenSSL libs.
      But corresponding warnings should be printed to the console.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      1
      • G Offline
        G Offline
        GCDX
        wrote on last edited by
        #3

        @raven-worx

        The google link works, and so do many links, it just so happen this one doesn't and if i try to use QWebview to google from there it still wont work. So i dont think its openSSL libraries?

        raven-worxR 1 Reply Last reply
        0
        • G GCDX

          @raven-worx

          The google link works, and so do many links, it just so happen this one doesn't and if i try to use QWebview to google from there it still wont work. So i dont think its openSSL libraries?

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          @GCDX
          so you are using QtWebkit right? (since you said you use QWebView)

          Check if the are any errors during loading by inspecting the relevant signals of QWebView/QWebPage/QWebFrame.
          Check javascript errors (subclass QWebPage and overload javaScriptConsoleMessage()) and assign your custom QWebPage sublass to your QWebView (via setPage())

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          2
          • G Offline
            G Offline
            GCDX
            wrote on last edited by
            #5

            @raven-worx I dont think there are errors at all during compiling! Could you elaborate on the how to check javascript errors or link me to documentation?

            JonBJ 1 Reply Last reply
            0
            • G GCDX

              @raven-worx I dont think there are errors at all during compiling! Could you elaborate on the how to check javascript errors or link me to documentation?

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by
              #6

              @GCDX
              @raven-worx does not mean there will be any "compilation errors", he means check for run-time errors.

              For, say, a JavaScript error he has already given you the documentation link http://doc.qt.io/archives/qt-5.5/qwebpage.html#javaScriptConsoleMessage. So you just sub-class QWebPage and override that virtual function to (say) qDebug() whatever its parameters are. For the QWebView etc. you go to http://doc.qt.io/archives/qt-5.5/qwebview.html and look at the Signals section, e.g. you want a slot for http://doc.qt.io/archives/qt-5.5/qwebview.html#loadFinished so that you can qDebug() << ok.

              1 Reply Last reply
              1

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved