PyQt5: fix scrolling and fix a test