I think u can use QLabel->setPixmap(...)
I think u can use QLabel->setPixmap(...)
ready (21st March 2011)
As u suggested i used label which is in display widget..
my code:
but this does not show error and neither it displays the image ............please helpQt Code:
void MainWindow::on_pushButton_2_clicked() { ui->imagelabel->setPixmap(*img);//named the label as imagelabel ui->imagelabel->show(); }To copy to clipboard, switch view to plain text mode
Well... here is the code i used:
Qt Code:
To copy to clipboard, switch view to plain text mode
And I didn't used the ui thing, so I really can't help there...
ready (21st March 2011)
thank you Archa4.....It really worked....
I would like to ask one more question...is it possible to get the co-ordinates from the picture displayed in label just by clicking with mouse ....ie mouse handling....
I have got no idea how to do it in qt please help
Well... I found another thing in documentation:
http://doc.trolltech.com/4.7/qwidget.html#pos-prop
It shows the position of a widget within the parent's widget.
I think u can use it like
QPoint point = imagelabel->pos();
But i cannot be sure...
Bookmarks