Initial port to QT5.1.