position - Converting mouse coordinates to label coordinates in Qt -
i'm in trouble such issue: need select area rect on label, i'm using qrubberband this, there 1 problem: need know coordinates of current rect on label, i'm in trouble it, because mouseevent->pos() give coordinates starts top left corner on mainwindow border, i've rotate standard coords on label (from top left bottom left corner, paint them usually).
anybody knows how can translation?
qpoint mappedpos = mylabel->mapfromparent(mywindow, mouseevent->pos());
also, qtransform
provides number of map()
functions should able point in rotated coordinates well.
see:
Comments
Post a Comment