There are no custom widgets in my "Qt Designer with QGIS 3.0.3 custom widgets". Is it a bug or I should somehow manually enable them?
-
2"Before we can use custom widgets in Qt Designer, we must make Qt Designer aware of them. There are two techniques for doing this: the "promotion" approach and the plugin approach." - quote from informit.com/articles/article.aspx?p=1405227&seqNum=3– cskJun 7, 2018 at 20:56
-
is so strange because I have this version with custom widgets!can you reinstall?I just installed this version and it works download.osgeo.org/qgis/win64/…– Fran RagaSep 17, 2018 at 19:35
2 Answers
The environment and path needs to be set for Qt Designer to access the QGIS Custom widgets. These can be set by running the "qgis-designer.bat" file that comes with a QGIS installation. For a network installation, this file is located in: ...\OSGEO4W64\bin\qgis-designer.bat
The contents of this batch file are:
@echo off
call "%~dp0\o4w_env.bat"
call qt5_env.bat
call py3_env.bat
path %OSGEO4W_ROOT%\apps\qgis\bin;%PATH%
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/qgis
set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\qgis\qtplugins;%OSGEO4W_ROOT%\apps\qt5\plugins
start "Qt Designer with QGIS custom widgets" /B designer.exe %*
In QGIS 3.2.0, custom widgets seem to be available:
Tested on Windows 7 64-bit.
Edit:
I used the QGIS Standalone Installer Version 3.2 (64 bit) and following the simple on-screen instructions. Once installed, I simply ran
Qt Designer with QGIS 3.2.0 custom widgets.exe
which was found in the Start menu.I also tested QGIS Standalone Installer Version 3.2 (32 bit) on a 32-bit computer and the custom widgets were also available.
-
For your test: 1. Did you use the "OSGeo4W Network Installer" or the "QGIS Standalone Installer"?; Do you need to set your environmental settings using a batch file or manual process so that QT Designer can find and use the relevant files? Sep 17, 2018 at 20:37
-
Also your Windows is 64 bit, but did you use a 32 bit or a 64 bit QGIS installation? Sep 17, 2018 at 20:39
-
@PhilipWhitten - Edited post. Only used the Standalone installers for both 32-bit and 64-bit.– JosephSep 18, 2018 at 9:24
-
2I found my problem. With the QGIS installation there is a file called "qgis-designer.bat", you need to run this file which sets the environment settings for "Qt Designer.exe" and then opens "Qt Designer". If you open "Qt Designer.exe" directly then you don't get the correct environment and you will not see the QGIS Custom Widgets. The "qgis-designer" batch file is opened by the shortcut called "Qt Designer with QGIS 3.2.2 custom widgets" which comes with the QGIS installation. The short answer is don't open "Qt Designer" directly. Sep 18, 2018 at 10:21
-