Bug fix: Events passed their timestamp as their type.
Requires Qt5.
Refactored internals of EventMngr.
Better Qt integration to the main loop.