QtDialog: Fix Qt 5 build on non-Windows.

The Qt5Core_QTMAIN_LIBRARIES variable is defined to the Qt5::WinMain
target on Windows, and undefined elsewhere.
Merge topic 'fix-Qt5-non-Windows' into next

5f210672 QtDialog: Fix Qt 5 build on non-Windows.