[PyQt] Artifacts in rendering QPixmap
massimo di stefano
massimodisasha at gmail.com
Mon Apr 9 11:28:53 BST 2018
Hi,
I trying to code a quick way to scroll over a large number of images (10^6), but Im having trouble in rendering the image properly.
In my attempt I noticed the precence of an artifact when I scroll over the images which is visible inthis screen recording:
https://cl.ly/qkul <https://cl.ly/qkul>
I tryied to reduce my code to a minimum working example to reproduce the issue, a gist is available here:
https://gist.github.com/epifanio/dab2d8a6b07e889607a313eefa6358d1 <https://gist.github.com/epifanio/dab2d8a6b07e889607a313eefa6358d1>
while at this link I stored the whole code including a number of images to facilitate testiing
https://nextcloud.epinux.com/index.php/s/Z55puQ9apGXUh6f <https://nextcloud.epinux.com/index.php/s/Z55puQ9apGXUh6f>
The ui is generated with QtDesigner, I can post the ui file as well if useful to debug.
From the gif I posted it is possible to notice the rendering bug in tree moments:
- single press of the buttons [<<<] [>>>]
- quick scroll over the zoom slider
- quick scroll over the image-indexer slider
If I hold the press on the [<<<] [>>>] the "artifact" is not noticiable.
There is also a second (minor) bug, which I don't know if related to the same issu.
The image-index spinbox doesn't refresh when I single press the [<<<] [>>>] buttons,
while its value gets correcctly update when hold press [<<<] [>>>]
(I have to focus with the pointer inside the spin-box to get the value update).
I'm pretty sure there is some bad coding from my side,
perhaps there is a better way to accomplish what I'm tryingto do.
I will really appreciate an help in understanding what I'm doing wrong.
Thanks!
Massimo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180409/00d9124b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180409/00d9124b/attachment.sig>
More information about the PyQt
mailing list