Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED]Qt assistant does not work in target machine
Qt 6.11 is out! See what's new in the release blog

[SOLVED]Qt assistant does not work in target machine

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 3.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bonride
    wrote on last edited by
    #1

    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:

    C:\appname\trunk\docs

    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:

    QHCP:
    @<?xml version="1.0" encoding="UTF-8"?>
    <QHelpCollectionProject version="1.0">
    <assistant>
    <title>App Name</title>
    <applicationIcon>images/appname.png</applicationIcon>
    <cacheDirectory>CompanyName/App Name</cacheDirectory>
    <homePage>qthelp://org.qt-project.examples.appname/docs/index.html</homePage>
    <startPage>qthelp://org.qt-project.examples.appname/docs/index.html</startPage>
    <enableDocumentationManager>true</enableDocumentationManager>
    <aboutMenuText>
    <text>About App Name</text>
    </aboutMenuText>
    <aboutDialog>
    <file>about.txt</file>
    <icon>images/appname.png</icon>
    </aboutDialog>
    <enableDocumentationManager>false</enableDocumentationManager>
    <enableAddressBar>false</enableAddressBar>
    <enableFilterFunctionality>false</enableFilterFunctionality>
    </assistant>
    <docFiles>
    <generate>
    <file>
    <input>assistantname.qhp</input>
    <output>assistantname.qch</output>
    </file>
    </generate>
    <register>
    <file>assistantname.qch</file>
    </register>
    </docFiles>
    </QHelpCollectionProject>@

    QHP:
    @<?xml version="1.0" encoding="UTF-8"?>
    <QtHelpProject version="1.0">
    <namespace>org.qt-project.examples.appname</namespace>
    <virtualFolder>docs</virtualFolder>
    <filterSection>
    <toc>
    ......
    </toc>
    <keywords>
    ........
    </keywords>
    <files>
    <file>dojo.css</file>
    <file>.html</file>
    <file>images/
    .jpg</file>
    <file>images/.png</file>
    <file>images/
    .svg</file>
    </files>
    </filterSection>
    </QtHelpProject>@

    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,
    Thanks.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Bonride
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved