Feature request #17735

Add tools for Py3Qt5 in OSGeo4W

Added by Loïc BARTOLETTI almost 7 years ago. Updated almost 7 years ago.

Status:Open
Priority:Normal
Assignee:Jürgen Fischer
Category:Windows Package
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:25631

Description

Hi,

Can we have in the osgeo4w package the usual tools to build python plugins in QGis (qt5-designer, pyuic5, QGis 2.9/3 custom widgets...)?

Regards

History

#1 Updated by Harrissou Santanna almost 7 years ago

Loïc, enable qt5-tools package in osgeo4w and you should get qt5-designer/linguist. i also see a pyqt5 package (i don't know if it's py3 but worth a check)

#2 Updated by Loïc BARTOLETTI almost 7 years ago

Thank you Harrissou,
With a double check, I saw that qt5-designer is installed into the Qt5 directory.
I never seen it before because it's not in the windows menu. Also, there is no batch file to launch it with QGis 3 widgets. I have created this file, don't know if it's well written.

@echo off
call "%~dp0\o4w_env.bat" 
call qt5_env.bat
call py3_env.bat
path %OSGEO4W_ROOT%\apps\qgis-dev\bin;%PATH%
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/qgis-dev
set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\qgis-dev\qtplugins;%OSGEO4W_ROOT%\apps\Qt5\plugins
start "Qt Designer 5 with QGIS custom widgets" /B ..\apps\Qt5\bin\designer.exe %*

Also with the OSGeo4W shell, I can run pyrcc4, pyuic4 but not pyrcc5, pyuic5 (command not found). If I run C:\OSGeo4W64\apps\Python36\Scripts\pyrcc5.bat Phyton crash.

C:\>C:\OSGeo4W64\apps\Python36\Scripts\pyrcc5.bat
Fatal Python error: Py_Initialize: unable to load the file system codec
  File "C:\OSGEO4~1\apps\Python27\lib\encodings\__init__.py", line 123
    raise CodecRegistryError,\
                            ^
SyntaxError: invalid syntax

Current thread 0x0000047c (most recent call first):

Regards

#3 Updated by Jürgen Fischer almost 7 years ago

Loïc BARTOLETTI wrote:

Also with the OSGeo4W shell, I can run pyrcc4, pyuic4 but not pyrcc5, pyuic5 (command not found). If I run C:\OSGeo4W64\apps\Python36\Scripts\pyrcc5.bat Python crash.

Run call py3_env.bat and qt5_env.bat if you want Py3/Qt5 instead of Py2/Qt4 in the osgeo4w shell. Then pyrcc5.bat should work (and you don't need to specify the full path).

#4 Updated by Loïc BARTOLETTI almost 7 years ago

Thank you Jürgen, it works.

Is it possible to add a shortcut in the windows menu for this (especially qt designer)?

Regards.

Also available in: Atom PDF