Details
Description
I am trying to move over from PyQt5 to PySide2. I use PyCharm as my editor/IDE. As I get going I am noticing problems/limitations with PySide2 autocompletion and argument type warnings from the PyCharm editor. I am not using any PyQt-aware extensions in PyCharm editing, so I believe they must emanate from differences in how PySide2 exposes its library to the editor. I do not claim to understand how that works.
Let's take a couple of fundamental examples I have immediately encountered:
from PySide2 import QtCore, QtWidgets
btnModeless = QtWidgets.QPushButton("Open Modeless", None)
btnModeless.clicked.connect(...)
- PyCharm highlights and warns on the None passed as parent to any QWidget constructor, such as QPushButton. It says its type must be QWidget. This leaves code covered in warning highlights.
- PyCharm cannot find anything for the btnModeless.clicked (nor for other signals). It will not offer clicked as a member to select in completion on btnModeless/QPushButton, nor anything after the clicked. (since it doesn't recognise the clicked).
The code itself runs fine using PySide2 instead of PyQt5, and if I import from PyQt5 instead I do not get the warning from #1 and I do get the completions from #2.
I could go on and enumerate more similar issues, but these will do to start with. They may or may not seem small, but these sorts of editing issues make all the difference to me as developer. I'd like to move to PySide2, but cannot if these are typical of the issues I will encounter.
How/where do editors get this information for argument types, completion methods, etc.? There must be something supplied with PySide2 which is different from PyQt5. Are my expectations unrealistic? Is anybody in the PySide2 interested in addressing these, ior will they remain more or less as-is? Because for my part I'm more interested in this sort of fundamental experience being sorted out in PySide2 than any amount of new features you might be wanting to add to PySide2.