Pregunta

I'm just getting started using PyQT 5, and I'm finding the documentation a bit lacking. I took a peek around the directory in site-packages, and couldn't find what I was looking for. What is the best way to:

a) Get Intellisense/Autocomplete working in PyCharm for PyQT5

or b) take a peek at the python implementation of pyQT to see what methods/etc are available to me?

Their docs all just point to QT5 C++ docs, which is great, but I was looking for exact method signatures in python.

Thanks!

¿Fue útil?

Solución

I read this page and followed Anže Starič's opinion.

My computer is

  • Windows 10
  • Python 3.5
  • PyQt5
  • PyCharm 5.0.1

So I typed:

python "C:\Program Files\JetBrains\PyCharm 5.0.1\helpers\generator3.py" -x -d "C:\Users\user\.PyCharm50\system\python_stubs\324234324" PyQt5
python "C:\Program Files\JetBrains\PyCharm 5.0.1\helpers\generator3.py" -x -d "C:\Users\user\.PyCharm50\system\python_stubs\324234324" PyQt5.QtCore
python "C:\Program Files\JetBrains\PyCharm 5.0.1\helpers\generator3.py" -x -d "C:\Users\user\.PyCharm50\system\python_stubs\324234324" PyQt5.QtWidgets
......

I tried EVERY module. Of course, you can write a batch file/shell script and you should change those paths to your own.

Finally the autocomplete works.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top