Closed zdebanos closed 5 months ago
I have now this error (I'm investigating it) under PyQt6:
Traceback (most recent call last): File "/home/bucher/CACSD/pysimCoder/toolbox/supsisim/supsisim/block.py", line 124, in paint renderer.render(painter, where_to) TypeError: arguments did not match any overloaded call: render(self, p: Optional[QPainter]): argument 1 has unexpected type 'QPainter' render(self, p: Optional[QPainter], bounds: QRectF): argument 1 has unexpected type 'QPainter' render(self, painter: Optional[QPainter], elementId: Optional[str], bounds: QRectF = QRectF()): argument 1 has unexpected type 'QPainter'
Solved! The provided "block.py" worked only under pyQt5! Now the import of "QtSvg is moved in "qtvers.py"
Construct a QtSvg.QSvgRenderer inside the method and calculate the bounds to render the SVG properly instead of rendering bitmaps.
This commit also imports QtSvg from PyQt5. It must be tested whether compatibility won't be broken.