Skip to content

Floor mouse positions rather than rounding

Arjen Hiemstra requested to merge work/ahiemstra/floor into master

Converting from QPointF to QPoint normally rounds rather than flooring. QHoverEvent::pos() returns the same as QHoverEvent::posF() except converted to QPoint using that rounding method. This can result in mouse positions that are outside of the actual geometry. To avoid this, manually floor from the floating position and use that.

Merge request reports