Hi, The charactermap widget in the PyQt demo does not work correctly under python3: it processes mouse move and click event coordinates incorrectly with the result that the tooltip and the line edit field select the wrong character to display.
The cause of the problem is that the mouseMoveEvent() and mousePressEvent() methods use normal division (/) rather than floor division (//) to discover which character cell the mouse is pointing at. In python2 normal division actually performs floor division if both operands are integer. In python3 normal division produces a floating point result for that case. The attached diff replaces the use of normal division with floor division in those two methods. The resultant source is suitable for use with both python2 and python3. -- Colin
charactermap.diff
Description: Binary data
_______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
