I use help button (from QDialog) to open an HTML file, but i want it to open on specific header (<h1>, <h2>, etc.), depending on from which window i use help button.
This is how i open HTML:
QDesktopServices::openUrl(QUrl(QCoreApplication::applicationDirPath() + "/HELP.html"));
How can i do it?
When you add
idattributes to your headlines, you can use anchor links:<h1 id="somename">my headline</h1>Your link can then look like this:
QDesktopServices::openUrl(QUrl(QCoreApplication::applicationDirPath() + "/HELP.html#somename"));