AddItem where QGraphicsSceneMouseEvent happened
I want to add an Item if a mouseclick happens, the event works
@void Board::mousePressEvent(QGraphicsSceneMouseEvent *event)
//board inheritates from QGrapicsScene
I can get the coordinates of the event with event.scenePos(), but if I create a new Item and write addItem() and setPosition( Pos of event) I have strange behavior. If I click on the view, it is always inserted in the middle...
the coordinates are correct, I've checked that with qDebug...
I found "Your text to link here...":http://stackoverflow.com/questions/7761442/qgraphicsitem-setpos-is-not-moving-items-position
but could really figure out what I have to do or why this happens
I've found the answer to my problem
but if I setSceneRect(), I've got the problem, that the Scene has a limited size and no scrollbars.. how can I change that? someone a smart idea?