Solved Information from QT_DEBUG_PLUGINS
-
In https://forum.qt.io/topic/90675/cannot-connect-to-databases-driver-not-loaded-error/5 @SGaist wrote:
Then start your application with the QT_DEBUG_PLUGINS environment variable set to 1. That will give you some more information about what is happening.
I did not know about this. It is useful to me, to understand what is going on. Two very quick questions, if I may (I use PyQt5, not C++):
-
There are a lot more plugins being loaded that I had imagined! I shan't ask about each of them, as I'm sure there are good reasons. However, i would like to check: it loads
QMYSQLDriverPlugin
, which is fair enough as I use MySQL, but it also loadsQSQLiteDriverPlugin
, but I don't use SQLite. Is it that the MySQL plugin/driver requires the SQLite one too? -
My program defines a global
qtMessageHandler
, so I see all internal Qt messages. I notice that several (but not all) of the messages are:
WARNING qtLogger [errfunctions.py, 60, qtMessageHandler()]: Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers/libqsqlmysql.so, metadata=
...The WARNING means they are
QtCore.QtWarningMsg
. This seems strange, as they are all warning that metadata has been found, not is missing! Is this relevant, or should I just regard it as aQtCore.QtInfoMsg
? -
-
@JonB said in Information from QT_DEBUG_PLUGINS:
There are a lot more plugins being loaded that I had imagined!
The whole platform integration layers is in plugins nowadays, so brace yourself. :)
but it also loads QSQLiteDriverPlugin, but I don't use SQLite. Is it that the MySQL plugin/driver requires the SQLite one too?
Nope, it loads everything it can find. If it can't find it then it won't load it.
Is this relevant, or should I just regard it as a QtCore.QtInfoMsg?
I don't think you should be worried about it.
-
Hi,
-
The system goes through all of the plugins available until it finds the one it's interested in. The metadata are what is used to select the correct plugin..
-
You can indeed treat that specific warning as information.
-