[SOLVED]Qt assistant does not work in target machine

  • Hello, my application includes a custom Qt assistant .
    When I run the application in this machine (Qt installed) the assistant works fine. When I install and run the application on another machine that does not have Qt, the assistant does not work and returns the following error in a dialog:

    Qt Error
    Error registering documentation file 'C:\docs\assistantname.qch' : Cannot open documentation file C:\docs\assistantname.qch!

    The machine path on which I have the Qt assistant files is:


    inside this folder there are many html files, image files and qhcp, qhp files.

    The path of installed program in the target machine is:

    _C:\Program Files\appname_ > all the application.
    C:\Program Files\appname\bin > binary files.

    First I thought it would be due to plugins, so I have included all but still the same error. Also the "dll" files.
    I think it may be the settings of qhp and qhcp files:

    @<?xml version="1.0" encoding="UTF-8"?>
    <QHelpCollectionProject version="1.0">
    <title>App Name</title>
    <cacheDirectory>CompanyName/App Name</cacheDirectory>
    <text>About App Name</text>

    @<?xml version="1.0" encoding="UTF-8"?>
    <QtHelpProject version="1.0">

    I have also thought that the error may occur in the process of creating the qch and QHC. I use a bat file to do this:

    @C:\Qt\Qt5.0.2\5.0.2\mingw47_32\bin\qcollectiongenerator assistantname.qhcp -o ..\installer\packages\com.companyname.appname\data\win\assistantname.qhc

    C:\Qt\Qt5.0.2\5.0.2\mingw47_32\bin\assistant -collectionFile ..\installer\packages\com.companyname.appname\data\win\assistantname.qhc@

    I don't know where the error is,

  • I answer myself, the error was in the process of creating the qhc file.

    Apparently it must be created in the same path where are its sources (qch, qhcp and qhp). I was sending it directly to my installer binary folder.

    I don't know why but doing it in this way, the Qt assistant works on other machines which have no Qt installed.

    I hope someone can serve this solution.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.