c++ - QToolTip shows up in the wrong cordinates -


i have qcustomplot , show qtooltip on mouseover component. here using. slot.

void customplot::displayplotvalue(qmouseevent* val) {      qtooltip::showtext(val->pos(), "a tool tip"); } 

however tool tip aappears in wrong cordinates (its infact out of form has component) . suggestion on might doing wrong ?

use qwidget::maptoglobal map coordinates relative widget global coordinates, relative whole screen:

qtooltip::showtext(widget->maptoglobal(val->pos()), "a tool tip"); 

where widget qwidget.


Comments

Popular posts from this blog

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -