PyQt autocompletion

Answered

Hi all,

What's the current status regarding autocompletion with pyqt4? I've yet to get it fully working so far.  I've seen a few threads but the ones I've looked at dont seem to have any resolution, so I thought it best to ask. :-)

-Si

2
10 comments

Hello simon,

It's supposed to work. What exactly doesn't work for you?

What's the current status regarding autocompletion with pyqt4? I've

yet to get it fully working so far.  I've seen a few threads but the

ones I've looked at dont seem to have any resolution, so I thought it

best to ask. :-)

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

0

It's probably me, but if I create an instance of a Qt object eg.

_table = QtGui.QTableWidget()

I get the autocompletion up to this point, but then I get nothing for the _table instance of the widget, so you constantly have to keep refering to the docs.

-Si

0

Sorry for commenting on an old thread.  But there are a few PyQt threads on the forum and it seems they are all asking the same thing.  Should PyQt completion work?

I still have the same issues.  I don't get any autocomplete from PyQt unless its in the interpreters site packages folder.  In our project setup its marked as a source folder as it's within a sub-dir of the root package.  Still, PyQt support is very poor.  I've just gotten an email asking me to renew my subscription.  I'd like to know if PyQt completion is going to get better.  I'd also like to know what is on the road map for future v3 releases.

-Dave

1

Searching other posts this is the only way I get partial complete.

from PyQt4.uic.Compiler.qtproxies import QtGui

This then gives me all the .QWidgets and taking a instance gives me only a handful of methods.

0

Veery old post, and I am sorry for that, but it seems like this still happening.

Maybe something I did can contribute, or be a clue for you:

given this scenario: (no autocompletion suggestions)

[1]

I went to File > Invalidate Caches / Restart > Invalidate and restart

and then this happen:

[2] 

for a few seconds!, then indexing finishes and it comes back to [1] state.

1

Hi Alejandro! I believe it was a glitch - PyCharm saw you already used this method with menu_bar and incorrectly suggest it during the indexing.

PyCharm doesn't understand addMenu method return type (there're no type annotation) so it assumes menu_archive can be anything. There is a workaround tough - to specify the menu_archivo type manually:

from PyQt4.QtGui import QMenu

...

menu_archivo = menu_bar.addMenu('&Archivo') # type: QMenu
1

what a pity. I really think that PyCharm should be able to achieve something like this:

0

I see, thank you for gif. I created an issue for the problem: PY-24939.

1

Awesome, thank you very much!

0

How is this still not fixed?

This seems to works on VSCode perfectly, but not on pycharm!

0

Please sign in to leave a comment.