Set environment variable QT_DEBUG_PLUGINS=1
before running your program, then run it. This gives diagnostic output, look through it to see why it fails to load QMYSQL
driver.
在运行程序之前设置环境变量“QT_DEBUG_PLUGINS=1”,然后运行它。 这会提供诊断输出,查看它以了解为什么无法加载“QMYSQL”驱动程序。