Help with qhelpgenerator
-
I have the following two files:
default.css:.content { display:none; } .hoverme:hover > .content { display:inline-block; }
test.html:
<html> <head> <link rel="stylesheet" href="default.css"> <meta content="David Partridge" name="author"> </head> <body><div class="hoverme"> 1 image <div class="content"><img src="stack_1.jpg" />1 light image</div> </div> <div class="hoverme"> 2 images <div class="content"><img src="stack_2.jpg" />1stack of 2 light image</div> </div> <div class="hoverme"> 3 images <div class="content"><img src="stack_3.jpg" />1stack of 3 light images</div> </div>
I created:
test.qhcp:<?xml version="1.0" encoding="utf-8" ?> <QHelpCollectionProject version="1.0"> <docFiles> <generate> <file> <input>test.qhp</input> <output>test.qch</output> </file> </generate> <register> <file>test.qch</file> </register> </docFiles> </QHelpCollectionProject>
and test.qhp
<?xml version="1.0" encoding="UTF-8"?> <QtHelpProject version="1.0"> <namespace>github.com.deepskystacker</namespace> <virtualFolder>doc</virtualFolder> <customFilter name="My Application 1.0"> <filterAttribute>myapp</filterAttribute> <filterAttribute>1.0</filterAttribute> </customFilter> <filterSection> <filterAttribute>myapp</filterAttribute> <filterAttribute>1.0</filterAttribute> <toc> <section title="My Application Manual" ref="test.html"/> </section> </toc> <!-- <keywords> <keyword name="foo" id="MyApplication::foo" ref="doc.html#foo"/> <keyword name="bar" ref="doc.html#bar"/> <keyword id="MyApplication::foobar" ref="doc.html#foobar"/> </keywords> --> <files> <file>default.css</file> <file>test.html</file> </files> </filterSection> </QtHelpProject>
and ran
qhelpgenerator test.qhcp
and then
assistant -collectionFile test.qch
And all that I was shown was:
Clearly I got that wrong ... but what should I change to get something displayed?
-
Hi,
The first I would do is remove the stylesheet to ensure you have everything showing properly.
Then I would add things back to it. -
Can anyone tell me what is wrong please! I've been banging my head against the metaphorical brick wall trying to understand what is wrong.
@Perdrix said in Help with qhelpgenerator:
Can anyone tell me what is wrong please! I've been banging my head against the metaphorical brick wall trying to understand what is wrong.
You might find it easier to debug the configuration via QHelpEngine and friends.
-
Huh! So you are saying I should write an application to dig into the help file to fix this - that's not a great thought IMHO.
@Perdrix said in Help with qhelpgenerator:
Huh! So you are saying I should write an application to dig into the help file to fix this - that's not a great thought IMHO.
This is a programming forum. Advice on solving problems through writing code should be expected.
https://doc.qt.io/qt-6/qthelp-contextsensitivehelp-example.html is an extremely simple example that demonstrates loading a help file, one method for searching for content, and displaying it to the application user.
https://doc.qt.io/qt-6/qthelp-framework.html is a high-level overview.
The Qt 5 version mentions using Assistant for display. Perhaps there was a reason for removing the reference in Qt 6.
-
P Perdrix has marked this topic as solved