We have problems with QWebEngineView on Windows 7 if an aero theme is enabled (default). Once the QWebEngineView is being rendered, the whole window is rendered in a wrong scale. When switching to a basic theme everything is being rendered as expected.
如果启用了aero主题,我们在Windows 7上遇到QWebEngineView问题(默认)。呈现QWebEngineView后,整个窗口的呈现方式都是错误的。切换到基本主题时,所有内容都按预期呈现。
Simpe testcase I used:
我使用的Simpe测试用例:
import sys
from PyQt5.QtWidgets import QApplication
from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEngineSettings
app = QApplication(sys.argv)
web = QWebEngineView()
web.load(QUrl("https://www.qt.io/"))
web.show()
sys.exit(app.exec_())
In Chrome the page looks like:
在Chrome中,该页面如下所示:
But in the QWebEngineView the whole window is cut and uses the wrong scale:
但是在QWebEngineView中,整个窗口被剪切并使用了错误的比例:
Even worse: adding a QWebEngineView in a PyQt UI scales the whole UI window this way.
更糟糕的是:在PyQt UI中添加QWebEngineView可以通过这种方式扩展整个UI窗口。
I checked the following environment variables:
我检查了以下环境变量:
AA_Use96Dpi=False
AA_UseHighDpiPixmaps=False
AA_UseDesktopOpenGL=False
AA_UseOpenGLES=False
AA_UseSoftwareOpenGL=False
AA_ShareOpenGLContexts=True
AA_EnableHighDpiScaling=False
AA_DisableHighDpiScaling=False
additionally I tried to set dpiaareness with values from 0-2 in qt.conf without any change.
另外我尝试在qt.conf中设置dpiaareness,其值为0-2,没有任何变化。
Any hint / help is welcome.
任何提示/帮助都是受欢迎的。
Thanks
1 个解决方案
#1
0
It pointed out that updating to the very last intel video card driver solved the issue (unfortunately this version of the graphics driver is not stable / produces blue screens in other scenarios why we used the previous version so far). Thanks to @eyllanesc for the hint!
它指出更新到最后一个英特尔视频卡驱动程序解决了这个问题(不幸的是,这个版本的图形驱动程序不稳定/在其他情况下产生蓝屏,为什么我们使用以前的版本)。感谢@eyllanesc的提示!
My conclusion is to switch to another framework asap as long QT depands on OpenGL (for embedding QtWebEngineView) - which has a very poor support on Windows and depands on the graphics card driver. We couldn't expect changes in near future to this concept in QT. Background can be found here: Is there any way to use QtWebEngine without OpenGL?
我的结论是在OpenGL(用于嵌入QtWebEngineView)上尽可能长时间切换到另一个框架 - 这对Windows和图形卡驱动程序的支持很差。我们不能指望在QT中这个概念在不久的将来会发生变化。背景可以在这里找到:有没有办法在没有OpenGL的情况下使用QtWebEngine?
#1
0
It pointed out that updating to the very last intel video card driver solved the issue (unfortunately this version of the graphics driver is not stable / produces blue screens in other scenarios why we used the previous version so far). Thanks to @eyllanesc for the hint!
它指出更新到最后一个英特尔视频卡驱动程序解决了这个问题(不幸的是,这个版本的图形驱动程序不稳定/在其他情况下产生蓝屏,为什么我们使用以前的版本)。感谢@eyllanesc的提示!
My conclusion is to switch to another framework asap as long QT depands on OpenGL (for embedding QtWebEngineView) - which has a very poor support on Windows and depands on the graphics card driver. We couldn't expect changes in near future to this concept in QT. Background can be found here: Is there any way to use QtWebEngine without OpenGL?
我的结论是在OpenGL(用于嵌入QtWebEngineView)上尽可能长时间切换到另一个框架 - 这对Windows和图形卡驱动程序的支持很差。我们不能指望在QT中这个概念在不久的将来会发生变化。背景可以在这里找到:有没有办法在没有OpenGL的情况下使用QtWebEngine?