The implementation of checkColliding() looks like this:
void MyScene::checkColliding(){ for(QGraphicsItem* item: collidingItems(m_player)) { if (Coin *c = qgraphicsitem_cast<Coin*>(item)) { c->explode(); } }}