I have this in my Dialog header:
Qt Code:
  1. void mousePressEvent(QMouseEvent *);
  2. void mouseMoveEvent(QMouseEvent*);
  3. void mouseReleaseEvent(QMouseEvent *);
To copy to clipboard, switch view to plain text mode 
And this in my cpp:

Qt Code:
  1. scene=new QGraphicsScene(0,0,800,600);
  2. ui->graphicsView->setScene(scene);
  3. QPixmap p2("C:/Users/Pedro/Desktop/imagens/6.jpg");
  4. scene->addItem(item);
To copy to clipboard, switch view to plain text mode 

Is possible to open a new window or to do any action when the item is clicked? Sorry people, I'm begginer. Can you help me, please?
Qt Code:
  1. void Dialog::mousePressEvent(QMouseEvent * e) {
  2.  
  3. }
To copy to clipboard, switch view to plain text mode