I used the sourcePixmap
member function of QGraphicsEffect
to inspect the source pixmap that was drawn, and displayed it in an additional window. To prevent the background color of the previous window from interfering with the observation, I set the background color of this window to green.
At the same time, I added a QLabel
to the original window to display the text "Hello World."
Since the window background had turned black, I set the text color to white. Here is the screenshot of the running program:
However, when I resized the window, a rendering error occurred, and green appeared (I didn't set the background color of all windows to green):
Even though I used setAutoFillBackground(true)
, there was still a hint of green around the window edges:
Therefore, I believe this is a bug in Qt.