MAINT: fixed indentation.
Worked around a platform-specific widget position bug.

This seems to be the case for Mac OS X.
MAINT: used `QSignalSpy::wait()` instead of `QTest::qWait()`.
MAINT: reformatted lines of code.
Worked around Travis CI.

This is a nasty workaround to avoid testing mouse and keyboard events.