hi friends...

i am creating a IDE using QT Designer 3.3
i ve created a button and a textlabel.
my work is if i click he button i need to display an image over the textlabel. the textlabel is my main workspace.
i need to save my textlabel contents as a jpg format.
but i cant.. mu codings are,
[void HMI_form::fileSave()
{
if ( fileName.isEmpty() ) {
fileSaveAs();
} else {
QFile f( fileName );
if ( f.open( IO_WriteOnly ) ) {
QPixmap pt( fileName,"*.png");
}
}
}


void HMI_form::fileSaveAs()
{
QString fn = QFileDialog::getSaveFileName("Untitled", "*.png", cwidget );
if ( !fn.isEmpty() ) {
fileName = fn;
fileSave();
}

}]

i can able to save only null image.
after my execution the msg i got is "cant able to convert null image"

can any one help me over this...
i cant able to move forward bcoz of this.

thanks in advance...