Hi Im using QLabel to display an image like bellow:
Qt Code:
  1. mLabel = new QLabel();
  2. mLabel->setBackgroundRole(QPalette::Base);
  3. mLabel->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
  4. mLabel->setPixmap(QPixmap::fromImage(mImage));
To copy to clipboard, switch view to plain text mode 

I would like to know the correct position of the pixmap's first top-left pixel that is draw, relevant to QLabel. How I can get this info ? I'm writing an image color picker based on mouse position and I need to know the top and left offset of the QLabel's pixmap. I've tried several methods :
mLabel->frameGeometry().x();
mLabel->frameGeometry().y();
mLabel->margin();
mLabel->indent();
mLabel->contentsMargins().top();
mLabel->contentsMargins().left();
mLabel->contentsRect();
mLabel->getContentsMargins(&left, &top, &right, &bottom);
but none of them give me the correct result