PDA

View Full Version : QGraphicsView-QGraphicsObject or Item-ItemIsMovable-coordinates



martadrlik
27th July 2011, 13:19
Hi, how can I get correct movable behavior? I can't explain that's why I show it http://www.youtube.com/watch?v=epFfRKjvAAE

how I create view and scene?

myGraphicsView(..) : QGraphicsView(..){
setScene(new QGraphicsScene);
}
void myGraphicsView::resizeEvent(QResizeEvent *){
setSceneRect(rect());
}

and simply add item (with ItemIsMovable flag of course) and get this (how you can see in video above). Scene/view coordinates are different of screen coords or something like that.

martadrlik
28th July 2011, 11:28
Solved. I would like to remove this post, but I can't.