Quote Originally Posted by high_flyer View Post
Override the mouseMoveEvent(), extract mouse position from event object, and use it to set widgets position.
Make sure to insert your legend class using QwtPlot::insertLegend(your_legend_p, QwtPlot::ExternalLegend) though. This will make the legend a child of the plot instead of placing it somewhere else. Then you can simply captue the mouseMoveEvent() events and then just set your geometry however you would like on your legend widget.