Hello,

I'm developing an application that displays a default image in a QGraphicsiew (named viewer) when it's executed and displays other image when a button it's clicked but my code doesn't work:

main.cpp
Qt Code:
  1. int main(int argc, char *argv[])
  2. {
  3. QApplication a(argc, argv);
  4. catiz w;
  5. w.showFullScreen();
  6.  
  7. return a.exec();
  8. }
To copy to clipboard, switch view to plain text mode 

catiz.cpp
Qt Code:
  1. ...
  2. catiz::catiz(QWidget *parent) : QWidget(parent),ui(new Ui::catiz)
  3. {
  4. ui->setupUi(this);
  5.  
  6. QPixmap pixmap(":/init.jpg");
  7. scene.addPixmap(pixmap);
  8. ui->viewer->setScene(&scene);
  9. }
  10. ...
To copy to clipboard, switch view to plain text mode 

What could be wrong? I'm using QtCreator.

Best regards.