Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/qt/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml 自定义Qt助手:未显示内容_Xml_Qt_Documentation_Assistant - Fatal编程技术网

Xml 自定义Qt助手:未显示内容

Xml 自定义Qt助手:未显示内容,xml,qt,documentation,assistant,Xml,Qt,Documentation,Assistant,我打算创建一个定制的Qt助手,以便在我自己的应用程序中提供帮助。 我遵循了关于该主题的Qt文档。当我启动助手时,目录和所有关键字都可用,但我的内容不显示 有人能发现我在这个精简版本中做错了什么吗 测试。qhp: <?xml version="1.0" encoding="UTF-8"?> <QtHelpProject version="1.0"> <namespace>test</namespace> <virtualFolder&g

我打算创建一个定制的Qt助手,以便在我自己的应用程序中提供帮助。
我遵循了关于该主题的Qt文档。当我启动助手时,目录和所有关键字都可用,但我的内容不显示

有人能发现我在这个精简版本中做错了什么吗

测试。qhp:

<?xml version="1.0" encoding="UTF-8"?>
<QtHelpProject version="1.0">
  <namespace>test</namespace>
  <virtualFolder>doc</virtualFolder>

  <filterSection>
    <toc>
      <section title="test" ref="index.html">
      </section>
    </toc>

    <keywords>
      <keyword name="Test" ref="index.html"/>
    </keywords>

    <files>
      <file>index.html</file>
    </files>

  </filterSection>
</QtHelpProject>
<?xml version="1.0" encoding="UTF-8"?>
<QHelpCollectionProject version="1.0">
  <assistant>
    <title>test</title>
    <!--     <applicationIcon>images/handbook.png</applicationIcon> -->
    <cacheDirectory>test/doc</cacheDirectory>

    <startPage>qthelp://test/doc/index.html</startPage>

    <aboutMenuText>
      <text>About test</text>
    </aboutMenuText>

    <enableDocumentationManager>false</enableDocumentationManager>
    <enableAddressBar>false</enableAddressBar>
    <enableFilterFunctionality>false</enableFilterFunctionality>
  </assistant>

  <docFiles>
    <generate>
      <file>
        <input>test.qhp</input>
        <output>test.qch</output>
      </file>
    </generate>
    <register>
      <file>test.qch</file>
    </register>
  </docFiles>
</QHelpCollectionProject>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
  <head>
    <title>Test title</title>
  </head>
  <body>
    <h1>index</h1>
    This is the index page
  </body>
</html>

测试
医生
index.html
测试。qhcp:

<?xml version="1.0" encoding="UTF-8"?>
<QtHelpProject version="1.0">
  <namespace>test</namespace>
  <virtualFolder>doc</virtualFolder>

  <filterSection>
    <toc>
      <section title="test" ref="index.html">
      </section>
    </toc>

    <keywords>
      <keyword name="Test" ref="index.html"/>
    </keywords>

    <files>
      <file>index.html</file>
    </files>

  </filterSection>
</QtHelpProject>
<?xml version="1.0" encoding="UTF-8"?>
<QHelpCollectionProject version="1.0">
  <assistant>
    <title>test</title>
    <!--     <applicationIcon>images/handbook.png</applicationIcon> -->
    <cacheDirectory>test/doc</cacheDirectory>

    <startPage>qthelp://test/doc/index.html</startPage>

    <aboutMenuText>
      <text>About test</text>
    </aboutMenuText>

    <enableDocumentationManager>false</enableDocumentationManager>
    <enableAddressBar>false</enableAddressBar>
    <enableFilterFunctionality>false</enableFilterFunctionality>
  </assistant>

  <docFiles>
    <generate>
      <file>
        <input>test.qhp</input>
        <output>test.qch</output>
      </file>
    </generate>
    <register>
      <file>test.qch</file>
    </register>
  </docFiles>
</QHelpCollectionProject>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
  <head>
    <title>Test title</title>
  </head>
  <body>
    <h1>index</h1>
    This is the index page
  </body>
</html>

测试
测试/文件
qthelp://test/doc/index.html
关于测试
假的
假的
假的
test.qhp
test.qch
test.qch
index.html:

<?xml version="1.0" encoding="UTF-8"?>
<QtHelpProject version="1.0">
  <namespace>test</namespace>
  <virtualFolder>doc</virtualFolder>

  <filterSection>
    <toc>
      <section title="test" ref="index.html">
      </section>
    </toc>

    <keywords>
      <keyword name="Test" ref="index.html"/>
    </keywords>

    <files>
      <file>index.html</file>
    </files>

  </filterSection>
</QtHelpProject>
<?xml version="1.0" encoding="UTF-8"?>
<QHelpCollectionProject version="1.0">
  <assistant>
    <title>test</title>
    <!--     <applicationIcon>images/handbook.png</applicationIcon> -->
    <cacheDirectory>test/doc</cacheDirectory>

    <startPage>qthelp://test/doc/index.html</startPage>

    <aboutMenuText>
      <text>About test</text>
    </aboutMenuText>

    <enableDocumentationManager>false</enableDocumentationManager>
    <enableAddressBar>false</enableAddressBar>
    <enableFilterFunctionality>false</enableFilterFunctionality>
  </assistant>

  <docFiles>
    <generate>
      <file>
        <input>test.qhp</input>
        <output>test.qch</output>
      </file>
    </generate>
    <register>
      <file>test.qch</file>
    </register>
  </docFiles>
</QHelpCollectionProject>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
  <head>
    <title>Test title</title>
  </head>
  <body>
    <h1>index</h1>
    This is the index page
  </body>
</html>

考试题目
指数
这是索引页
我使用
qcollectiongenerator test.qhcp-o test.qhc


当我使用
assistant-collectionFile test.qhc
打开助手时,我只看到一个空白页,而不是
index.html
的内容。

这是由Qt助手中的错误引起的:

html代码至少需要512字节长