Help with qhelpgenerator
-
wrote on 11 Mar 2025, 17:31 last edited by
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
Clearly I got that wrong ... but what should I change to get something displayed?
-
wrote 22 days ago last edited by
opening the qhc file with assitant rather the the .qch file makes a huge difference!!!
-
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. -
wrote on 12 Mar 2025, 09:28 last edited by
The html displays as expected with the style sheet (outside Assistant). If I remove the style sheet then the hover stuff won't work.
-
wrote on 12 Mar 2025, 11:27 last edited by
I commented out the stylesheet in the html code, but still showed nothing. I suspect it's something I got wrong in the .qhp file.
-
wrote on 14 Mar 2025, 12:55 last edited by
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.
-
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.
wrote on 14 Mar 2025, 22:11 last edited by@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.
-
wrote on 15 Mar 2025, 02:32 last edited by
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.
-
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.
wrote on 15 Mar 2025, 06:46 last edited by@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.
-
wrote 22 days ago last edited by
opening the qhc file with assitant rather the the .qch file makes a huge difference!!!
-