How to rotate a lattice of hexagons in Qt
Hi, I want to create a lattice of hexagons in Qt that the user can rotate via a slider specifying the angle. How can this be achieved as efficiently as possible in Qt?
The painter paths example (http://developer.qt.nokia.com/doc/qt...nterpaths.html) looks promising, but I'm not sure if it's the way to go given that there will be hundreds of hexagons, all rotating around each other (i.e., the lattice will be rotating).
I'd appreciate any advice. Thanks!
Anthony
Re: How to rotate a lattice of hexagons in Qt
Graphics View seems the obvious choice.
Re: How to rotate a lattice of hexagons in Qt
Thanks, Graphics View has been working out well. However, I have encountered a bit of a problem, which is that I can't get the correct hexagon from a mouse click due to the fact that the bounding rectangles of adjacent hexagons overlap. I'm currently using a subclassed QGraphicsItem. Would I need to re-implement a method in QGraphicsItem? Or perhaps QGraphicsView or QGraphicsScene?
Re: How to rotate a lattice of hexagons in Qt
To anyone interested, just re-implement QGraphicsItem::Shape.