hi i'm still having a problem with QGraphicsScene
I've created a widget called Gioco and i've declared the *scene in the constructor
Gioco::Gioco()
{
QGraphicsScene *scene = new QGraphicsScene();
scene -> setSceneRect(0,0,1980,1200);
setScene(scene);
}
now I want to use the same *scene in a void but i get the error undefinied reference to *scene
void Gioco::partita()
{extern QGraphicsScene *scene;
//create a new Pixmap Item
QGraphicsPixmapItem *img_mazzo = new QGraphicsPixmapItem();
img_mazzo -> setPixmap(QPixmap(":/Media/Immagini/dorso.jpg"));
//add to scene
scene -> addItem(img_mazzo);
}
how can I solve this error ? thanks