Main GL code and QT