slaclab / pydm

Python Display Manager
http://slaclab.github.io/pydm/
Other
113 stars 78 forks source link

PyDM installation fails with PySide2 as a result of qRound usage #611

Open mattgibbs opened 4 years ago

mattgibbs commented 4 years ago

When attempting to install PyDM with PySide2 (aka Qt for Python), you get an import error: ImportError: cannot import name 'qRound' from 'qtpy.QtCore'

This is because we use it in utilities.IconFont. We could probably just use python's math.round instead. I'm sure there are other things breaking PySide2 compatibility, but this is at least an easy one.

hhslepicka commented 4 years ago

Matt, PySide2 won’t work as they don’t wrap Q_ENUMS and some other parts that we need. In order to support it we would need to refactor PyDM a lot. Should we add that to 2.0? I plan to merge master into 2.0 and go over the tons of conflicts next week.

ronpandolfi commented 4 years ago

@hhslepicka Looks like Q_ENUM was recently implemented. Does this open a path to PySide2 support? https://bugreports.qt.io/browse/PYSIDE-957

hhslepicka commented 4 years ago

@ronpandolfi it for sure does!