Fix threading for Qt5.

Fix GL Context on Qt5.
Also fix EmuThread loop.

Working fine on Linux.
Why not just move this into the while condition as a `do...while`?