Fix PyQt compatibility of tests (PySide specific code).

Contributed by @idella ( Ref. #74 )