Refactor pqTextEditTest

The pqTextEditTest was a little bit flaky on Unix. Also make the test more
qt like to leverage QTest powerful methods.

Change-Id: I887af09c0e9d6fd0f60da4ece914527fe9797019
Merge topic '14788-pqTextEdit' into next

9ff6a4d5 Refactor pqTextEditTest