1

I wrote a simple test program to load a URL in a QWebEngineView. The program works on Mac; the browser pops up and I can see the webpage. But on Windows 7, the browser window never appears after I call show():

import sys

from PyQt5.QtWidgets import QApplication
from PyQt5.QtWebEngineWidgets import QWebEngineView
from PyQt5.QtCore import QUrl

class Browser(QWebEngineView):
    def __init__(self):
        super().__init__()
        self.load(QUrl('https://google.com'))
        self.loadFinished.connect(self.pageReady)

    def pageReady(self, success):
        if success:
            self.show()
        else:
            print('page failed to load')

if __name__ == '__main__':
    app = QApplication(sys.argv)
    browser = Browser()
    app.exec_()

Is there something I'm missing? My firewall is disabled, so it shouldn't be a connection problem...

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
std_answ
  • 1,039
  • 1
  • 11
  • 17

0 Answers0