Is there a way to avoid a QWidget from going out of sight?
I've got a line connecting some points; every point shows a widget (always the same) with some values; if I move the mouse over a point close to the right margin of the monitor, the QWidget will be shown just partially (a part will be out of the monitor).
How can I force the widget to be fully shown when needed, maybe on the left of the mouse?
Thanks to all.
you can compare the QWidget
s boundingRect()
and the QDesktopWidget
s boundingRect()
if outside, move the widget back ;)