Windows中的Qt QWebEngineView:无法显示任何内容

时间:2016-12-05 01:21:15

标签: python qt pyqt

我真的无法让QWebEngineView在Windows 7上运行。我的代码如下:

ValueErrors

HTMLRenderer:

class Main:
     def __init__(self):
          self.app = QApplication(sys.argv)

     def getWindow(self):
          win = QMainWindow()
          win.setWindowTitle(self.winTitle)
          win.setCentralWidget(HTMLRenderer())
          return win

     def create(self):
         win = self.getWindow()
         win.show()
         sys.exit(self.app.exec_())


if __name__ == '__main__':
     theMain = Main()
     theMain.create()

但是在Windows 7上,我可以看到主窗口,但看不到任何显示的HTML。但在Mac OS上,一切正常。

据我所知,QtWebEngineView使用Chromium作为后端。我是否需要在Windows上单独安装Chromium?当您下载Qt时,似乎已经包含它。

似乎有什么问题?非常感谢你。

0 个答案:

没有答案