Hello,
I am still relatively new to QT and when I initially started writing my application I based it off of examples that did not use the QT Creator, or Model/View architecture etc. ... I have since gone back and refactored my code to utilise these tools because of so many problems I was having and now it is working as I wanted it to. All except for the graphics part of it so I wanted to see if the problem is the way I have built it.
I have created as the primary graphics window a class derived from the QGraphicsView. I do all of my coordinate transforms, viewport updates, creation of the QGraphicsScene, handle drawing of the background, handle keypress events, zoom in zoom out, create the QGraphicsItems, etc. ...
The QGraphicsItems are added to the scene and do their own painting.
As I work through examples I have seen where the QGraphicsScene has a much more active role than I am giving it. It has been subclassed, and handles painting among other things.
What I am wondering is whether my set up is good, or is there a "best practices" way to do it that is hould be using as well. Like I said I have seen it done many different ways just like the UI was however the way I changed it to seems to be the "Best Practices" way of doing things.
Cheers!
-caolan.
Bookmarks