3 #include<QGraphicsScene>
6 #include <QGraphicsPixmapItem>
11 int random_pos = rand() %500;
14 setPixmap(QPixmap(
":/img/virus.png"));
16 QTimer * timer =
new QTimer();
17 connect(timer, SIGNAL(timeout()),
this, SLOT(
move()));
27 scene() -> removeItem(
this);
29 qDebug() <<
"enemy deleted!";