PyCharm has a nice feature where you can to click on (put your caret over) any Qt class or function, press Shift+F1 and open up the web documentation for that class or function.

I’m going to be focusing on Qt.py, but you could do the same for PySide2 and PyQt5 though newer version of PyCharm already have them configured. I’m using the Qt C++ documentation because:

  1. It lends itself to PyCharm’s external docs parameterization.
  2. It is more complete than QtForPython’s documentation at the moment.
  3. I find it easier to navigate and find inherited members.

The Setup#

  1. First, you’ll want to start out by making sure you’re using PyCharm 2018.3 or newer. These macros aren’t working in older versions.
  2. Open the settings: click File->Settings.
  3. Click on Tools->Python External Documentation.
  4. Add a new entry by clicking the “+” button.
  5. Set the module name to:
    Qt
  6. Set URL/Path Pattern to:
    https://doc.qt.io/qt-5/{class.name.lower}.html#{element.name.lower}
  7. Click OK

Try It Out#

Click on a Qt.py class or function and then press Shift+F1 or click on View->External Documentation. It will open up a new tab in your browser with the documentation. view_external_documentation