Menu

Qt Platform Plugin Windows

21.01.2019

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 '. I've attempted using various installs of qgis 3.x+ including the standalone installer and OSGeo4W web installer. I currently am sticking with the OSGeo4W web installer installation.

Platform

I am using a Python 3.7 installation separate from what comes with OSGeo4W and attempting to integrate qgis functionality. I have followed the instructions in the following QGIS help doc under the section: 'Using PyQGIS in Custom Applications' After attempting to run the script I realized a dll plugin was missing. After some research, I found its the qwindows.dll that qt uses. The qwindows.dll is included in the OSGeo4W installation under: C: OSGeo4W apps Qt5 plugins platforms I changed the QT_PLUGIN_PATH variable on the local command prompt to include the directory above, but the same error prevailed. I also changed the QT_DEBUG_PLUGINS variable to 1 which printed out the locations Qt is looking for plugins.

Interestingly, it wasn't looking for plugins in the path I specified in the QT_PLUGIN_PATH variable. Add the following environment variables at the beginning of your python script before loading qgis.core: #modify environment variables to find qgis and qt plugins during qgis.core import os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = r'~qgis directory apps Qt5 plugins' os.environ['PATH'] += r';~qgis directory apps qgis bin;~qgis directory apps Qt5 bin' The QT_QPA_PLATFORM_PLUGIN_PATH variable is used by Qt to look up certain drivers including the qwindows.dll. It doesn't know the path to the '~qgis directory apps Qt5 plugins' directory, so you need to provide it before using the QgsApplication module imported from qgis.core. In order for your local version of python to find the qgis.core directory, you will also need to add the following qgis directories to your script before loading qgis.core: sys.path.extend([r'~qgis directory apps qgis python',r'~qgis directory apps Python37 Lib site-packages']).

List dinamicheskogo nablyudeniya logopeda. Qt has it's own cross-platform IDE and is chock-full of tools designed for developing applications and UIs once and deploying them across multiple operating systems. Some features are limited to GPL. Qt Creator IDE & tools. Aug 30, 2017  The Qt Software Development Kit (SDK) is a cross-platform application framework that is widely used for developing application software with a graphical user interface (GUI). It is a portable cross platform application user interface framework which works on the Windows, Linux and Mac OS X operating systems.