Take a look at QGraphicsScene and QGraphicsView. This way you will be able to create a scene filled with items. Each item can receive mouse events and you can manually paint it.
AlexKR
2009-09-28 14:29:40
Take a look at QGraphicsScene and QGraphicsView. This way you will be able to create a scene filled with items. Each item can receive mouse events and you can manually paint it.
You can create a custom layout class that inherits from QLayout and overload the add(QWidget* w) function with the coordinates.
Personnally I'm using QGraphicsView and QGraphicsScene. You can handle some events (as mouse event) and easily find your QGraphicsItem.
Have a look at Gephex sourcecode on http://www.gephex.org/download.php
they have already built such a widget for Qt, although might be a bit old code (QT3) and application specific.
ciao