void Drum::creator() { if(game->count->counter>0) { int random=rand()%2; if(random==true) { qDebug()<<"bit1 out"; Bits *bits = new Bits(); scene()->addItem(bits); bits->setPos(800,50); } if(random==false) { qDebug()<<"bit2 out"; Bits2 *bits2 = new Bits2(); scene()->addItem(bits2); bits2->setPos(800,50); } } }