Hiya world ....
I have just started to do my own Qt projects....and I crossed a lot of problems realy !!
Okey , without be long..i give you my source code..
Qt Code:
  1. #include "visionneur.h"
  2.  
  3. Visionneur::Visionneur(): QWidget()
  4. {
  5.  
  6. m_ouvrir=new QPushButton("Ouvir une image",this);
  7. QObject::connect(m_ouvrir,SIGNAL(clicked()),this,SLOT(ouvrir()));
  8. m_contenu=new QLabel(this);
  9. m_contenu->setFrameShape(QFrame::Panel);
  10. m_contenu->setPixmap(QPixmap("image.png"));
  11.  
  12. }
  13. void Visionneur::ouvrir()
  14. {
  15. QString image = QFileDialog::getOpenFileName(this, "Ouvrir un fichier", QString(), "Images (*.png *.gif *.jpg *.jpeg)");
  16.  
  17. }
  18. Visionneur::~Visionneur()
  19. {
  20. }
To copy to clipboard, switch view to plain text mode 
Problem: the image doesnt apear on my window
I'd like some help to resolve that probleme , I'm using Dev-c++