Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Why doesn't QtWebkit render this webpage properly?

Why doesn't QtWebkit render this webpage properly?

Scheduled Pinned Locked Moved Unsolved Qt WebKit
4 Posts 2 Posters 1.1k Views
  • 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.
  • S Offline
    S Offline
    sherlock
    wrote on last edited by
    #1

    I am using python3-pyqt5.qtwebkit on Ubuntu 18.04, 64 bit to render webpages using Python3 and Qt5. However, this URL doesn't get rendered properly (see below). Below is the code I am using. What could the reason be?

    import sys
    from PyQt5 import QtCore, QtGui, QtWidgets
    from PyQt5.QtCore import *
    from PyQt5.QtGui import *
    from PyQt5.QtWidgets import *
    from PyQt5.QtWebKit import *
    from PyQt5.QtWebKitWidgets import *
    from PyQt5.QtWidgets import QApplication, QWidget, QMainWindow
    
    app = QApplication(sys.argv)
    
    web = QWebView()
    web.load(QUrl("https://www.semanticscholar.org/search?q=Amplification%20Hell%3A%20Revisiting%20Network%20Protocols%20for%20DDoS%20Abuse.&sort=relevance"))
    web.show()
    
    sys.exit(app.exec_())
    

    enter image description here

    K 1 Reply Last reply
    0
    • S sherlock

      I am using python3-pyqt5.qtwebkit on Ubuntu 18.04, 64 bit to render webpages using Python3 and Qt5. However, this URL doesn't get rendered properly (see below). Below is the code I am using. What could the reason be?

      import sys
      from PyQt5 import QtCore, QtGui, QtWidgets
      from PyQt5.QtCore import *
      from PyQt5.QtGui import *
      from PyQt5.QtWidgets import *
      from PyQt5.QtWebKit import *
      from PyQt5.QtWebKitWidgets import *
      from PyQt5.QtWidgets import QApplication, QWidget, QMainWindow
      
      app = QApplication(sys.argv)
      
      web = QWebView()
      web.load(QUrl("https://www.semanticscholar.org/search?q=Amplification%20Hell%3A%20Revisiting%20Network%20Protocols%20for%20DDoS%20Abuse.&sort=relevance"))
      web.show()
      
      sys.exit(app.exec_())
      

      enter image description here

      K Offline
      K Offline
      Konstantin Tokarev
      wrote on last edited by
      #2

      Because something is broken or missing in JavaScript engine, and parsing of code in AppEntry.584b85bf40.js fails with syntax error. Sorry but it probably cannot be fixed without updating whole WebKit code to its modern state

      1 Reply Last reply
      1
      • S Offline
        S Offline
        sherlock
        wrote on last edited by
        #3

        @Konstantin-Tokarev said in Why doesn't QtWebkit render this webpage properly?:

        Because something is broken or missing in JavaScript engine, and parsing of code in AppEntry.584b85bf40.js fails with syntax error. Sorry but it probably cannot be fixed without updating whole WebKit code to its modern state

        How did you debug this? Is there any logging available?

        Also, does QtWebkit use some non-recent version of Webkit engine? Isn't it just a wrapper around Webkit? Can the shipped version be updated easily (I guess not)?

        K 1 Reply Last reply
        0
        • S sherlock

          @Konstantin-Tokarev said in Why doesn't QtWebkit render this webpage properly?:

          Because something is broken or missing in JavaScript engine, and parsing of code in AppEntry.584b85bf40.js fails with syntax error. Sorry but it probably cannot be fixed without updating whole WebKit code to its modern state

          How did you debug this? Is there any logging available?

          Also, does QtWebkit use some non-recent version of Webkit engine? Isn't it just a wrapper around Webkit? Can the shipped version be updated easily (I guess not)?

          K Offline
          K Offline
          Konstantin Tokarev
          wrote on last edited by
          #4

          How did you debug this? Is there any logging available?

          Yes, there is JS console in Web Inspector. Also it's possible to get console messages via API

          Also, does QtWebkit use some non-recent version of Webkit engine?

          5.212 (which is currently shipped in Ubuntu) is based on WebKit branch from 2016

          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