开发者

How to install Qt documentation for PyQt demo and Qt tools

开发者 https://www.devze.com 2023-04-12 08:08 出处:网络
I installed PyQt on windows 7 with python 2.6 and when trying to execute the demo I got the following warning:

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

How to install Qt documentation for PyQt demo and Qt tools

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 b开发者_C百科e 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.


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.


Unfortunately, the download site http://download.qt.io/archive/qt does NOT appear to have the documentation in .qct format. The downloads in .tar.gz and .zip format contain installers for the QT software, but the doc folder in the download files only contains documentation in .html format. This is the same format as the doc folder in the PyQt installation. The .html format is not readable by Qt Assistant. The PyQt installation also contains a subfolder in the doc folder called sphinx, which contains .rst files, which are also not readable by Qt Assistant

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号