Russian Qt Forum
Июнь 16, 2024, 01:43 *
Добро пожаловать, Гость. Пожалуйста, войдите или зарегистрируйтесь.
Вам не пришло письмо с кодом активации?

Войти
 
  Начало   Форум  WIKI (Вики)FAQ Помощь Поиск Войти Регистрация  

Страниц: [1]   Вниз
  Печать  
Автор Тема: Генерация qch  (Прочитано 3555 раз)
Андрей
Гость
« : Июль 02, 2013, 20:41 »

Мой qhp-файл - help2.qhp
Код:
 <?xml version="1.0" encoding="utf-8" ?>
 <QtHelpProject version="1.0">
     <namespace>sh.com.ttt.1.0</namespace>
     <filterSection>
         <keywords>     
               <keyword name="3D" id="3D" ref="help.htm"/>       
         </keywords>
         <files>
             <file>main.css</file>
             <file>help.htm</file>
         </files>
     </filterSection>
 </QtHelpProject>
Команда:
Код:
qhelpgenerator help2.qhp -o help.qch 
Выдаёт ошибку:
Код:
Error in line 1: XML declaration not in start of document.
Записан
Serr500
Гость
« Ответ #1 : Июль 02, 2013, 21:34 »

Пробелы перед <?xml ?> уберите.
Записан
Андрей
Гость
« Ответ #2 : Июль 03, 2013, 21:21 »

Спасибо. Дело было в пробеле. Буду дальше разбираться.
Записан
Андрей
Гость
« Ответ #3 : Июль 06, 2013, 18:50 »

При генерации файла коллекции выдаёт в самом конце
Код:
invalid documentetion file .. ... help.qch
При попытке открыть qch ассистентом открывает пустой ассистент. При попытке открыть программно выдаёт ошибку:
Код:
Ошибка чтения файла коллекции справки ......: Не удалось созда
(обрывается).
qhelpgenerator генерит нормальный qch, читаемый ассистентом.
Код:
<?xml version="1.0" encoding="UTF-8"?>
 <QHelpCollectionProject version="1.0">
 <assistant>
     <title>Tick-tack-toe</title>
     <applicationIcon>images/icon1.png</applicationIcon>
     <cacheDirectory>/E/Trainer/tick_tack_toe/helpviewer/documentation/</cacheDirectory>
     <startPage>qthelp://sh.com.ttt.1.0/doc/index.htm</startPage>
     <aboutMenuText>
         <text>About Simple Text Viewer</text>
     </aboutMenuText>
     <aboutDialog>         
     </aboutDialog>
     <enableDocumentationManager>false</enableDocumentationManager>
     <enableAddressBar>false</enableAddressBar>
     <enableFilterFunctionality>false</enableFilterFunctionality>
 </assistant>
   <docFiles>
     <generate>
         <file>
             <input>help.qhp</input>
             <output>help.qch</output>
             </file>
         </generate>
     <register>
         <file>help.qch</file>
         </register>
     </docFiles>
 </QHelpCollectionProject>

Код:
<?xml version="1.0" encoding="UTF-8"?>
 <QtHelpProject version="1.0">
     <namespace>sh.com.ttt.1.0</namespace>
     <virtualFolder>doc</virtualFolder>
     <customFilter name="My Application 1.0">
         <filterAttribute>tick-tack-toe</filterAttribute>
         <filterAttribute>1.0</filterAttribute>
     </customFilter>
     <filterSection>
         <filterAttribute>sh</filterAttribute>
         <filterAttribute>1.0</filterAttribute>
         <toc>
             <section title="Tic-Tack-Toe Manual" ref="index.htm">
                <section title="Rules" ref="rules.htm">
                   <section title="2D" ref="Field2d.htm"></section>
                   <section title="3D" ref="Field3d.htm"></section>
                </section>
                <section title="Userguide" ref="userguide.htm">
                </section>
             </section>
         </toc>
         <keywords>   
            <keyword name="Rules" ref="./rules.htm"/>
            <keyword name="Main menu" ref="./userguide.htm"/>             
         </keywords>
         <files>
             <file>main.css</file>
             <file>index.htm</file>
             <file>rules.htm</file>
             <file>Field2d.htm</file>
             <file>Field3d.htm</file>
             <file>userguide.htm</file>
             <file>images/layers.jpg</file>
         </files>
     </filterSection>
 </QtHelpProject>
Записан
Андрей
Гость
« Ответ #4 : Июль 07, 2013, 09:34 »

Всё работает. Опять пробел во внимательности. Писал
Код:
qcollectiongenerator help.qhcp -o help.qch
вместо
Код:
qcollectiongenerator help.qhcp -o help.qhс
Записан
Страниц: [1]   Вверх
  Печать  
 
Перейти в:  


Страница сгенерирована за 0.04 секунд. Запросов: 20.