PDA

View Full Version : Calling a specific topic in help file (.chm)



muggeric
8th December 2010, 14:24
Hi,

We are trying to implement a help file system for our Qt application. When the user clicks Help > User Guide, we have a (.chm) help file opening using the following code:


QDesktopServices::openUrl( QUrl::fromLocalFile( QString::fromStdString( zFullFilePath ) ) )

where zFullFilePath resolves to C:\SomePath\HelpFile.chm.

This all works correctly, as the HelpFile.chm will open successfully. But, we would like to open to a specific topic in that file. The standard for opening to specific topics is:

C:\SomePath\HelpFile.chm::/topic3.htm

However, the ShellExecute function that is called deep into the openURL function chokes on it and returns a 'File not found' code. Is there some other way that Qt can be tricked into opening that embedded htm file? Or does anyone have other suggestions of how we could resolve this?

Thanks,

Christian