On Monday 21 September 2015 01:50:44 Brad Pepers wrote:
> I was wondering if anyone knows why QMouseEvent::pos() returns a QPoint but
> QMouseEvent::localPos() returns a QPointF.  When do you ever have
> fractional pixels?  When would pos() and localPos() be different?

A simple look at the header would have answered:

    inline QPoint pos() const { return l.toPoint(); }

    const QPointF &localPos() const { return l; }

The two coordinates are the same.

Qt uses floating point coordinates for compatibility with graphics view and for 
future compatibility.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to