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:

qwidget::mapfromparent()

qtransform::map()


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -