1

I am using QGraphicsScene and View in Qt/PySide and have troubles using scaling the view - zoomin in.

I have a very simple scene:

scene = QtGui.QGraphicsScene()
scene.addText("hello!")
scene.addRect(0, 0, 50, 20)
view = QtGui.QGraphicsView(parent)
view.setScene(scene)

What I see is OK. When I zoom in using view.scale(factor, factor) and look at the lower left corner, it still is OK. enter image description here

... but when I zoom even closer, it gets broken. Rectangle is no more rectangle and I can see a diagonal line while the bottom line is missing.

enter image description here

What is wrong with my code? Or is it error in Qt library? Does it happen also in Qt with C++.

Community
  • 1
  • 1
  • I can observe this wrong behaviour when running PySide 1.2.1/Qt 4.8.5 (bundled in WinPython 3.3.2.3). I installed a new distribution WinPython 3.3.5 which has PySide 1.2.1 but it runs Qt 4.8.4 (yes, its an older version then in previous WinPython distribution) and now zooming works fine. Tested on both 32- and 64-bit versions. – HiFile.app - best file manager Apr 27 '14 at 20:08
  • 1
    It looks like this is a bug. See this question: http://stackoverflow.com/questions/25908244/why-is-a-rectangle-partly-outside-of-view-drawn-as-a-triangle – Joel Feb 16 '15 at 10:43

0 Answers0