[Qt-interest] Strange QGraphicsWidget problem
Thomas Fjellstrom
tfjellstrom at shaw.ca
Thu Apr 15 15:18:47 CEST 2010
On April 15, 2010, Thomas Fjellstrom wrote:
> I've had to write a custom QGraphicsWidget to handle my game's game board
> due to QGraphicsView not allowing you to ignore translations on items,
> and Its finally mostly done. However I'm stuck with a bug I just can't
> figure out.
>
> When I scale my board up and down (zoom in and out) vigorously, it
> occasionally causes the actual board squares to render smaller than they
> should, but the outline thats drawn after the squares is the right size.
> Both use the exact same variables to define their position and overall
> size.
>
> I've attached a file with the three most relevant functions out of the
> 20KB+ of code related to the issue (I can attach the raw files as well
> if needed).
>
> Thank you
I've created a screen shot of what it should look like, and what it /can/
look like occasionally:
http://strangesoft.net/sosgame-qtclient/prototype18-bug1.png
The background instance is what it should look like, and the foreground is
what it can look like occasionally. That black outline around the board is
drawn using the same variables/geometry, so its rather confusing.
--
Thomas Fjellstrom
tfjellstrom at shaw.ca
More information about the Qt-interest-old
mailing list