QFactoryLoader::QFactoryLoader() checking directory path "C:/OSGeo4W/apps/Python37/platforms". QFactoryLoader::QFactoryLoader() checking directory path "C:/OSGeo4W/apps/qgis/qtplugins/platforms". Here is the actual message with QT_DEBUG_PLUGINS set to 1:
Onedrive qt platform plugin windows windows#
However, I am still receiving the missing windows plugin error. I expect to run the python script and receive no errors since I'm pointing to the directory where the qwindows.dll missing plugin is stored. Set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\Qt5\plugins %OSGEO4W_ROOT%\apps\qgis\qtplugins Set PYTHONHOME=%OSGEO4W_ROOT%\apps\Python37 Set PYTHONPATH=%PYTHONPATH% %OSGEO4W_ROOT%\apps\qgis\python Path %PATH% C:\OSGeo4W\apps\Python37\Scripts ::Include environment variables set by qgis on startup
Onedrive qt platform plugin windows code#
# When your script is complete, call exitQgis() to remove the provider andīatch File Code to Start Cmd Prompt with Proper Variables: off # Write your code here to load some layers, use processing algorithms, etc. # setting the second argument to True enables the GUI, which we need to do # create a reference to the QgsApplication tPrefixPath('C:\\OSGeo4W\\apps\\qgis', True) #at the environment variable %PYTHONPATH% level #add qgis python libraries to instance python path in case not added Interestingly, it wasn't looking for plugins in the path I specified in the QT_PLUGIN_PATH variable. I also changed the QT_DEBUG_PLUGINS variable to 1 which printed out the locations Qt is looking for plugins. I changed the QT_PLUGIN_PATH variable on the local command prompt to include the directory above, but the same error prevailed. The qwindows.dll is included in the OSGeo4W installation under: C:\OSGeo4W\apps\Qt5\plugins\platforms After some research, I found its the qwindows.dll that qt uses. I have followed the instructions in the following QGIS help doc under the section: "Using PyQGIS in Custom Applications"Īfter attempting to run the script I realized a dll plugin was missing. I am using a Python 3.7 installation separate from what comes with OSGeo4W and attempting to integrate qgis functionality. I currently am sticking with the OSGeo4W web installer installation. I've attempted using various installs of qgis 3.x+ including the standalone installer and OSGeo4W web installer. I am implementing qgis 3.4.3 in a custom application, but when I instantiate the QgsApplication() class, I receive the error "Could not find the Qt platform plugin "Windows" in "".