Uses Qt to take screenshot and write to file as test