Thanks for answer. So, I change my code:

Qt Code:
  1. void Diagram::mousePressEvent(QMouseEvent *event)
  2. {
  3. QPoint point = event->pos();
  4.  
  5. QPainter painter(&pixmap);
  6. painter.setWindow(-50, -50, 100, 100);
  7.  
  8. QPoint out = painter.transform().inverted().map(event->pos());
  9.  
  10. qDebug() << point.x() << point.y();
  11. qDebug() << out.x() << out.y();
  12. }
To copy to clipboard, switch view to plain text mode 

but I still get the same value, for example:

Qt Code:
  1. 188 158
  2. 188 158
To copy to clipboard, switch view to plain text mode 

and I can't check this condition

Qt Code:
  1. up_p.containsPoint(out, Qt::OddEvenFill)
To copy to clipboard, switch view to plain text mode 

because I have polygons defiened like:

Qt Code:
  1. static const int upPoints_p[4][2] = {
  2. { 49, -49 }, { -49, -49 },
  3. { -10, -10 }, { 10, -10 }
  4. };
To copy to clipboard, switch view to plain text mode 

So, what am I doing wrong?