Qt is a c++ ui framework. The Maya ui is written in Qt5, but it used to be written in Qt4. There are python hooks into Qt, that are (terribly) named PySide (for Qt4) and PySide2 (for Qt5).
The different Qt versions, though VERY similar, are not compatible with each other.
You will have to update the code to use PySide2 instead of PySide. There’s more to it than just adding some “2”'s in the python script though.
The issue is that if you make it work in PySide2, it won’t work in PySide any more. This is where Qt.py comes in. It looks like PySide2 code (so you still have to do the update), but will also work in Qt4.