How i can set position X Y exact 10 px down from start event button?
or from last mouse position?
Printable View
How i can set position X Y exact 10 px down from start event button?
or from last mouse position?
You can move a window to the mouse position with code:
but in my opinion this is a bad idea. The mouse cursor might be anywhere on the screen and the window could possibly be misplaced partially out of the screen.
why not run so...
mapFromParent(QPoint(100, 100)); !not work!
Please, read the docs carefully:Quote:
Originally Posted by patrik08
Quote:
QPoint QWidget::mapFromParent ( const QPoint & pos ) const
Translates the parent widget coordinate pos to widget coordinates.