Updated code to mingw32/QT.