void QGraphicsItem::dropEvent ( QGraphicsSceneDragDropEvent * event ) [virtual protected]
#include <QTimer>QTimer *timer = new QTimer();
timer->start(1000); connect(timer, SIGNAL(timeout()), this, SLOT(Move()));
void MainWindowImpl::Move(){......timer->start(1000);}
C++ (Qt)class MyGraphicsRectItem : public QGraphicsRectItem{ Q_OBJECTsignals: void itemDropped();protected: void dropEvent (QGraphicsSceneDragDropEvent *event) { emit itemDropped(); }};
#include <QGraphicsRectItem>
connect(item[15],SIGNAL(itemDropped()),sender(),Move());
connect(item[15],SIGNAL(itemDropped()),sender(),SLOT(Move()));
for(int i=1;i<16;i++){ connect(item[i],SIGNAL(itemDropped()),this,SLOT(Move()));}
connect(item[15],SIGNAL(itemDropped()),this,SLOT(Move()));
void MainWindowImpl::Move(){item[13]->setRect(QRectF(-225.0+n1, 160.0, 190.0, 25.0));}