Qt5 port

@DonLakeFlyer @Susurrus this is required to fix my Qt5 compile issues - I just went ahead and ported it.