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..
#include "visionneur.h"
Visionneur
::Visionneur(): QWidget(){
QObject::connect(m_ouvrir,
SIGNAL(clicked
()),
this,
SLOT(ouvrir
()));
m_contenu
->setFrameShape
(QFrame::Panel);
m_contenu
->setPixmap
(QPixmap("image.png"));
}
void Visionneur::ouvrir()
{
}
Visionneur::~Visionneur()
{
}
#include "visionneur.h"
Visionneur::Visionneur(): QWidget()
{
m_ouvrir=new QPushButton("Ouvir une image",this);
QObject::connect(m_ouvrir,SIGNAL(clicked()),this,SLOT(ouvrir()));
m_contenu=new QLabel(this);
m_contenu->setFrameShape(QFrame::Panel);
m_contenu->setPixmap(QPixmap("image.png"));
}
void Visionneur::ouvrir()
{
QString image = QFileDialog::getOpenFileName(this, "Ouvrir un fichier", QString(), "Images (*.png *.gif *.jpg *.jpeg)");
}
Visionneur::~Visionneur()
{
}
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++
Bookmarks