Skip to content

Conversation

nstelter-slac
Copy link
Collaborator

@nstelter-slac nstelter-slac commented Sep 22, 2025

previously pyside6 pydm couldn't find the designer path,
and this was b/c QLibraryInfo.location(QLibraryInfo.PrefixPath) (and therefore with the other QLibraryInfo enum values too) returns different paths on pyqt5 vs pyside6:

pyqt5: /home/nolan/miniforge3/envs/pydm-environment-pyqt5/
pyside6: /home/nolan/miniforge3/envs/pydm-environment-pyside6/lib/python3.13/site-packages/PySide6/Qt/

taking a closer look into an example pyside6 conda-env, there seems to be two copies of the qt6 designer:
/home/nolan/miniforge3/envs/pydm-environment-pyside6/lib/python3.13/site-packages/PySide6/designer, and /home/nolan/miniforge3/envs/pydm-environment-pyside6/bin/designer6

these don't seem to be simlinks, and can both launch a version 6.9.2 of designer

so with PySide6 easiest way to grab a designer bin location might be just to remove "Qt/" from the end of the result-string from QLibraryInfo.location(QLibraryInfo.PrefixPath). Also,the qt6 designer in this location is just named 'designer', which avoids having to handle the 'pyside6-designer' vs 'designer6' naming diff on conda vs pip installs.

@nstelter-slac nstelter-slac force-pushed the pyside6_designer_naming branch 2 times, most recently from 4d369ba to df15ae0 Compare September 22, 2025 21:31
@nstelter-slac nstelter-slac force-pushed the pyside6_designer_naming branch 2 times, most recently from 3323f08 to 8756cb7 Compare September 22, 2025 21:45
Designer" button work with pyside6

previously pyside6 pydm couldn't find the designer path,
and this was b/c `QLibraryInfo.location(QLibraryInfo.PrefixPath)` (and therefore with the other QLibraryInfo enum values too) returns different paths on pyqt5 vs pyside6:

pyqt5: /home/nolan/miniforge3/envs/pydm-environment-pyqt5/
pyside6: /home/nolan/miniforge3/envs/pydm-environment-pyside6/lib/python3.13/site-packages/PySide6/Qt/

taking a closer look into an example pyside6 conda-env, there seems to be two copies of the qt6 designer:
"/home/nolan/miniforge3/envs/pydm-environment-pyside6/lib/python3.13/site-packages/PySide6/designer", and "/home/nolan/miniforge3/envs/pydm-environment-pyside6/bin/designer6"

these don't seem to be simlinks, and can both launch a version 6.9.2 of designer

so with PySide6 easiest way to grab a designer bin location might be just to remove "Qt/" from the end of the result-string from "QLibraryInfo.location(QLibraryInfo.PrefixPath)". The qt6 designer in this location is just named 'designer', which avoids having to handle the 'pyside6-designer' vs 'designer6' naming diff on conda vs pip installs.
@nstelter-slac nstelter-slac force-pushed the pyside6_designer_naming branch from 8756cb7 to db01ba3 Compare September 22, 2025 21:47
@nstelter-slac nstelter-slac added the pyside6 for adding pyside6 (qt6) support label Sep 22, 2025
@nstelter-slac nstelter-slac marked this pull request as ready for review September 22, 2025 21:51
Copy link
Collaborator

@jbellister-slac jbellister-slac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works ok for me! Can just remove the one commented out line and then good to merge.

@jbellister-slac jbellister-slac merged commit f763115 into slaclab:master Oct 4, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pyside6 for adding pyside6 (qt6) support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle 'designer' tool naming diff on pyside6 installed with pip vs conda

2 participants