为什么我添加的图片无法拖动,代码如下:
QGraphicsPixmapItem *lift = scene->addPixmap(QPixmap("1.png"));
lift->setFlag(QGraphicsItem::ItemIsMovable,true);
lift->setPos((qrand()%int(scene->sceneRect().width())),
(qrand()%int(scene->sceneRect().height())));
还望各位不吝赐教,Thanks