As u suggested i used label which is in display widget..
my code:
void MainWindow::on_pushButton_2_clicked()
{
QPixmap *img
= new QPixmap("freedom.jpg");
//this image is in folder that contains exe ui->imagelabel->setPixmap(*img);//named the label as imagelabel
ui->imagelabel->show();
}
void MainWindow::on_pushButton_2_clicked()
{
QPixmap *img = new QPixmap("freedom.jpg");//this image is in folder that contains exe
ui->imagelabel->setPixmap(*img);//named the label as imagelabel
ui->imagelabel->show();
}
To copy to clipboard, switch view to plain text mode
but this does not show error and neither it displays the image ............please help
Bookmarks