0

On Ubuntu 22.04, using Python 3.10.4, I've setup PyCharm community edition 2022.01 to use PySide2 designer (Qt) as an external tool. When I press the "create" button this error is produced and the process terminates. Similar reports in last 6 years and 6 months didn't work for me and PySide2 requires a special patch to work with Python3.10.4.

In PyCharm external tool QtDesigner5, program venv_dir/bin/pyside2-designer, working directory $ProjectFileDir$. I've set checkboxes Synchronize files after execution and Open console for tool output.

As additional info. PySide2 was built from 5.15.2 Qt maintenance tool sources and has pyside-setup branch set to 5.15. All traces of pyside2 and shiboken2 had previously been safely removed from Ubuntu system, as they cause numerous errors. One change was applied to sources: https://bugzilla.redhat.com/show_bug.cgi?id=2025599 (thanks Petr Viktorin 2022-01-21 16:46:48 UTC). Clean 'bdist_wheel' and 'install'. This does not affect PySide6 (6.3.0), which works without any issue.

Sildeag
  • 143
  • 12
  • Wondered if using C++17 would make a difference to PySide2 (it completed and was installed) since PySide6 worked. It didn't. C++11 option is used for PySide2. – Sildeag May 19 '22 at 02:32

1 Answers1

1

I observed that the date on the 'designer' binary was Nov 8, 2021 and, unlike PySide6, PySide2 did not appear to completely rebuild qttools, which includes 'designer'. Once I locally built 'designer' from Qt maintenance tool source 'Qt/5.15.2/Src/qttools', setting Qt build environment to 5.15, using qmake qttools.pro,make -j4 and installed locally in 'Qt/5.15.2/gcc_64/bin/designer the error message went away and 'designer' functioned as expected. I think the error message may have been caused by some sort of C++ compiler setting differences. Also, for some reason PySide2 unlike PySide6 builds in site-packages of the same name does not include a Qt folder that has lib, libexec, plugins, qml, resources, and translations folders. Maybe a compatibility legacy since both packages are built from different branches of pyside-setup.

For PySide2 Settings in PyCharm external tool QtDesigner5, program Qt/5.15.2/gcc_64/bin/designer, working directory $ProjectFileDir$. I've set checkboxes Synchronize files after execution and Open console for tool output.

Slightly different for PySide6. In PyCharm external tool QtDesigner6,(using my Python3.10.4 venv virtual environment) program venv_dir/bin/pyside6-designer, working directory $ProjectFileDir$. I've set checkboxes Synchronize files after execution and Open console for tool output.

Sildeag
  • 143
  • 12