PyQt5 port of modeltest.py