QLabel -> QPixmap -> get real image position?!
-
Hi Guys,
I need to get the scaled image position and size of a QPixmap drawn on to a QLabel. How can I achieve this? Unfortunately I only found out how to get the label or image size (before scaling).
Code snippet from label class:
QLabel::setPixmap(pix.scaled(this->size(), Qt::KeepAspectRatio, Qt::FastTransformation);Code snippet from main class:
ui->imageViewerLabel->imagePixmap...???Best regards,
Eddi0406 -
Hi,
Are you looking for the QLabel::pixmap() function ?