Well, nobody answered my question. I guess I can answer it myself after some investigation.
It turned out that, which platform plugin to use is determined during runtime, by a function called
qt_guiPlatformPlugin() defined under qguiplatformplugin.cpp
inside the function, QT checks an environment variable QT_PLATFORM_PLUGIN, and decides which plugin to load.