Re: QGraphicsView problem
Which parts other then creating the rectangle have you tried already?
The part where you get data from the database sounds completely solvable stand alone, i.e. can be tested without GUI or with simple widget GUI, see QSqlQuery
The visualization can also be implemented and tested without the database access, see QGraphicsItem and subclasses
Cheers,
_
Re: QGraphicsView problem
thank you for your reply anda_skoa, reading data from the database is not a problem, the problem is creating the rectangles.
Re: QGraphicsView problem
You write that you already managed to create a rectangle item and add it to the scene.
So what kind of problem do you have with it?
Cheers,
_
Re: QGraphicsView problem
the problem i have is aligning the rectangle item to the top left-hand corner of the GraphicsView and then make the rectangles item's length be the same size as the GraphicsView's length size.
Re: QGraphicsView problem
QGraphicsView::mapToScene() methods should help you with that.
Cheers,
_