Had to put QApplication and QGuiApplication under conditional compilation in captchagen.