And now it works, need to have QApplication at the top...