[PySide] issue with qwebengineview on windows

Luca Tringali TRINGALINVENT at libero.it
Fri Nov 15 13:24:47 CET 2019


Hello everybody,
I'm writing a simple Python class for creating WordArts (https://github.com/zorbaproject/pythonWordArt). The code is quite simple: I'm using HTML+JS+CSS, made by another coder, to actually draw WordArts. What my code does is just rendering the HTML inside a hidden qwebengineview and getting the result as an image. Now, I've tried it both on GNU/Linux desktop and on headless servers, and it works perfectly (with and without OpenGL). But if I try to run it on Windows there's a problem: the images are completely white. This seems to be a problem with the loadFinished signal. I added a debug flag that makes the qwebengineview visible: this way you can see if the text gets rendered.
If you try to run this code:

from pythonWordArt import pyWordArt
w = pyWordArt()
w.debug = True
w.WordArt("Text here", w.Styles["rainbow"], "100")
w.toFile("test.png")

You'll see that the window pops up but it's white. The program holds for input as soon as the loadFinished signal is emitted (and the __grabimage function is called). Now, if you press Enter the file is created but it's still a white image. Instead, if you stop the execution by pressing Ctrl+C you'll see the text correctly appearing in the window.
So, I was wondering if I am missing something, or if this is a bug.


Luca Tringali




More information about the PySide mailing list