--- PyQt-mac-gpl-4.7.7/examples/widgets/charactermap_orig.py	2010-09-20 14:17:39.000000000 +0100
+++ PyQt-mac-gpl-4.7.7/examples/widgets/charactermap.py	2010-09-21 15:38:07.000000000 +0100
@@ -81,7 +81,8 @@
 
     def mouseMoveEvent(self, event):
         widgetPosition = self.mapFromGlobal(event.globalPos())
-        key = (widgetPosition.y() / self.squareSize) * self.columns + widgetPosition.x() / self.squareSize
+        key = ((widgetPosition.y() // self.squareSize) * self.columns +
+                widgetPosition.x() // self.squareSize)
 
         text = QtCore.QString.fromLatin1("<p>Character: <span style=\"font-size: 24pt; font-family: %1\">").arg(self.displayFont.family()) + \
                 QtCore.QChar(key) + \
@@ -91,7 +92,8 @@
 
     def mousePressEvent(self, event):
         if event.button() == QtCore.Qt.LeftButton:
-            self.lastKey = (event.y() / self.squareSize) * self.columns + event.x() / self.squareSize
+            self.lastKey = ((event.y() // self.squareSize) * self.columns +
+                             event.x() // self.squareSize)
             if QtCore.QChar(self.lastKey).category() != QtCore.QChar.NoCategory:
                 self.characterSelected.emit(QtCore.QString(QtCore.QChar(self.lastKey)))
             self.update()
