So you mean that the problem was NOT the new class myQGraphicsView, but the fact that drawItems was re-implemented?
If so, what about mouse*Event methods?
So you mean that the problem was NOT the new class myQGraphicsView, but the fact that drawItems was re-implemented?
If so, what about mouse*Event methods?
MacOSX user dabbling with Linux and Windows.
I didn't say anything like that. I said you shouldn't start programming by reimplementing methods that do something useful. The base class implementation is probably sufficient for you.
I am sorry, but I am getting confused. Let's take this very slowly.
You suggest that I should not create a derived class, but instead override the existing methods when needed, such as mouseMoveEvent, mousePressEvent and mouseReleaseEvent, and not override drawItems.Use QGraphicsView and QGraphicsScene instead of MyQGraphics... classes.
Did I understand this correctly?
I appreciate your patience.
Last edited by bnilsson; 7th January 2008 at 11:45.
MacOSX user dabbling with Linux and Windows.
Let's close the discussion about "reimplementation", after reading all of your comments again I now understand your point. Thanks for your patience.
Last edited by bnilsson; 7th January 2008 at 16:59.
MacOSX user dabbling with Linux and Windows.
If you want to override anything, then you need to subclass. The rest is correct.
Bookmarks