With Qt5, the window type must be checked at run-time: the windowing system is always defined as Q_WS_QPA.