BUG: Coerce new event code to QEvent.Type.

In PySide, QEvent strictly only accepts objects of type QEvent.Type. The
integer returned from QEvent.registerEventType() needs to be coerced.
Merge pull request #75 from rkern/fix-pyside-qevent

BUG: Coerce new event code to QEvent.Type.