Patches for Qt 5

QT 5 fixes are from https://bitbucket.org/manctl/pcl/commits/095d858dd4f843ecfa637708d25a5202467f44d1, with a work around for QT bug 29331: https://bugreports.qt-project.org/browse/QTBUG-29331.