PDA

View Full Version : How to move items with x axis keep y axis



linhdong24
5th July 2013, 02:39
Hi everybody,i use QGraphics and create a rect item. I want to this item only move x Axis keep y Asis.
rectangle = scence->addRect(180,90,50,50,blackpen,redbrush);
rectangle->setFlag(QGraphicsItem::ItemIsMovable);
-> error: item will move over graphicsview
9267
sorry,my english not good :)