Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Qt documentation for PyQt demo and Qt tools

I installed PyQt on windows 7 with python 2.6 and when trying to execute the demo I got the following warning:

enter image description here

After some research I could obtain a copy of the Qt4 documentation in .qch format that works with Qt Assistant.

How documentation has to be installed in order to get it on the PyQt4 demo and eliminate the warning?

Is the qt.qch documentation I am using with Qt Assistant valid for this or there is a specific document for the demo. If yes, where can it be downloaded from?

I have been searching the net for some time and found other people asking the same or similar questions, also in SO, but with no useful answer for me.

like image 851
joaquin Avatar asked Oct 09 '11 20:10

joaquin


People also ask

Is PyQt the same as Qt?

You can choose between two libraries for using Qt from Python: PyQt is mature but requires you to purchase a license for commercial projects. Qt for Python is a recent push by Qt the company to officially support Python. It's offered under the LGPL and can thus often be used for free.

What is PIP install PyQt5?

PyQt5 5.15. 7 PyQt5 is a comprehensive set of Python bindings for Qt v5. It is implemented as more than 35 extension modules and enables Python to be used as an alternative application development language to C++ on all supported platforms including iOS and Android.

Does PyQt require Qt?

More information about licensing can be found in the License FAQ. PyQt does not include a copy of Qt. You must obtain a correctly licensed copy of Qt yourself. However, binary wheels of the GPL version of PyQt6 and PyQt5 are provided and these include a copy of the corresponding LGPL version of Qt.


1 Answers

The .qch files have to be in the pyqt documentation folder for the demos to work correctly. If you accepted the default paths when you installed python and pyqt, this will probably be C:\Python27\Lib\site-packages\PyQt4\doc.

Before you move the .qch files, open up Qt Assistant and remove the documentation you added previously. Then close Qt Assistant and move all the .qch files into a qch folder in the pyqt doc folder: e.g. C:\Python27\Lib\site-packages\PyQt4\doc\qch. The required .qch files are qt.qch, designer.qch and linguist.qch.

When you re-open Qt Assistant it should automatically find all the documentation and start re-indexing it. After that finishes, close down Qt Assistant and open up the PyQt demos.

There are a couple of important things to note: firstly, the warning message box will always appear on Windows even if the documentation has been installed correctly (which is really a bug - the startup script could easily make the necessary checks). Secondly, not all of the demos have descriptions, so you will still see the warning Could not load description. Ensure that the documentation for Qt is built in many places (e.g. Demonstrations\Minehunt). However, if you've installed things correctly, all the demos in the Dialogs section should have both descriptions and screenshots, for instance.

like image 162
ekhumoro Avatar answered Oct 20 '22 04:10

ekhumoro