pydm icon indicating copy to clipboard operation
pydm copied to clipboard

PyDM installation fails with PySide2 as a result of qRound usage

Open mattgibbs opened this issue 4 years ago • 3 comments

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.

mattgibbs avatar Mar 26 '20 23:03 mattgibbs

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.

hhslepicka avatar Mar 26 '20 23:03 hhslepicka

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

ronpandolfi avatar Jul 08 '20 20:07 ronpandolfi

@ronpandolfi it for sure does!

hhslepicka avatar Jul 08 '20 20:07 hhslepicka