News: I solved my own problem. Here is the code:

Qt Code:
  1. void MainWindow::mousePressEvent(QMouseEvent *event)
  2. {
  3. if ((event->type() == QMouseEvent::MouseButtonDblClick) && (event->button() == Qt::LeftButton))
  4. {
  5. timer.stop();
  6. QLabel *child = static_cast<QLabel*>(childAt(event->pos()));
  7.  
  8. if( const QPixmap * p = child->pixmap() )
  9. {
  10. QDialog dialog;
  11. connect(&dialog,SIGNAL(destroyed()),this,SLOT(restartTimer()));
  12. QLabel * label = new QLabel(&dialog);
  13.  
  14. QPixmap a = QPixmap::fromImage(imagemsemred);
  15. label->setPixmap(a);
  16. dialog.resize(a.size());
  17. dialog.exec();
  18. }
  19. }
  20. }
  21.  
  22. QImage MainWindow::newDimension(QImage image)
  23. {
  24. imagemsemred = image;
  25. nova_imagem = image;
  26.  
  27. if (image.height() > ui->Image->height())
  28. nova_imagem = image.scaledToHeight(ui->Image->height());
  29.  
  30. if (image.width() > ui->Image->width())
  31. nova_imagem = image.scaledToWidth(ui->Image->width());
  32.  
  33. return nova_imagem;
  34. }
To copy to clipboard, switch view to plain text mode 

The only problem is that I don't know what to do with that "p", since I don't use it as a variable but Its necessary for the software only allows mouse events over the Label.


Thanks for everything,

Momergil