504 qt5 fixes

See https://github.com/commontk/CTK/issues/504.