Unsolved QGraphicsView drawing artifacts
-
Hi,
Sorry for the delay !
I tried today with a 5.5 version, provided mingw and same platform, and actually it works well ! Now I should try with 5.8 as you suggested, to see if the issue has been fixed in the meantime. -
Well, compiling Qt on Windows is quite a pain.. Can I find binaries of 5.8 somewhere ?
-
The snapshot of the Beta can be found here.
-
Thank you for the link, I will keep it somewhere :)
Well, the artifacts are still presents in 5.8 Beta (tag number 584), do you want me to test other versions, for example the msvc one ? -
One more thing you can test is forcing the use of Desktop OpenGL. See here for the variable to set and how (no need to re-build Qt though).
-
Hi, I tried the various values of the QT_OPENGL variable, but nothing changes. Actually, I'm not using a QGLWidget for the QGraphicsView. I tried to : it does remove the artifacts, but generates other limitations, on antialiasing for example, so I'd like to keep the "non-opengl" implementation.
-
Then it's likely a Windows specific issue, you should take a look at the bug report system to see if its something known.
-
I can't find something similar, I will create a new bug.
Thank you for the support. -
Thanks ! Don't forget to share the link to the report, it will make it easier to find.
-
Here is the bug link :
https://bugreports.qt.io/browse/QTBUG-56517I think I will try to make a minimal project to reproduce the bug, I know it helps developpers :)
-
@wawanbreton
A minimal project is very helpful ! - as it allows developers to easily reproduce
the bug, so please do! :) -
Hi,
I finally had time to add a project. The bug can be reproduced by starting the application and just play a bit with the mouse (I detailed the instructions in the bug report).
Now I hope someone has time to work on it :) -
@wawanbreton
Its a good idea to post link to bug report here as
people searching the forums can go vote for the issue. -
I had the same problem, it took a long and frustrating amount of time to try and fix, but I think that I have found a solution.
Inside my paint function for that graphicsItem I created a region, then set clip region.
QRegion r1(QRect(-40, -40, 400, 200));
painter->setClipRegion(r1);
This may cause some other problems later, but I haven’t come across them yet. And I’m not sure on the performance cost of doing this when you have a large number of items on the screen. I think that I will move the creation of the region to outside of paint to start with.