<div dir="ltr">Respected Sir,<div><br></div><div>I want to ask you a query that, how could I open a .chm file (ie. a help file) in QGIS framework or in a programmers' language you can say how to call a .chm file using python on a button's click event in QGIS framework.</div>
<div><br></div><div>I have used this code</div><div><br></div><div>import os,sys</div><div><br></div><div>class Help():</div><div>    def help(self):</div><div>        os.startfile( os.getcwd()+"E:/Noise_project/DGNSS/apps/qgis/python/plugins/DGNSS/noise_help.chm")</div>
<div>    </div><div>after that I have used this function to use it on a click event</div><div><br></div><div> QObject.connect(self.help_action, SIGNAL("triggered()"), self.Help)</div><div><br></div><div><br></div>
<div><div>def Help(self):</div><div>        self.help=open_help.Help()</div></div><div><br></div><div><br></div><div>But i am not able to open this file in QGIS, ie. it is not able  to execute this function.</div><div><br>
</div><div><br></div><div><br></div><div>Another thing is that, I have also tried to open a html file using the same concept ie. to click a button & open the the file but still it is not even opening the html file also. As per the instructions provided by the QGIS official plugin development site. i am providing the link also <a href="http://www.qgis.org/en/docs/pyqgis_developer_cookbook/plugins.html">http://www.qgis.org/en/docs/pyqgis_developer_cookbook/plugins.html</a></div>
<div><br></div><div>and this is the Documentation part of plugin which I have also implemented still it is not working</div><div><br></div><p style="margin:0px 0px 10px;font-size:0.9rem;line-height:1.4rem;color:rgb(51,51,51);font-family:'Open Sans','Helvetica Neue',Ubuntu,Arial,sans-serif">
The documentation for the plugin can be written as HTML help files. The <tt class="" style="background-color:transparent;font-weight:bold"><span class="">qgis.utils</span></tt> module provides a function, <tt class="" style="background-color:transparent;font-weight:bold"><span class="">showPluginHelp()</span></tt> which will open the help file browser, in the same way as other QGIS help.</p>
<p style="margin:0px 0px 10px;font-size:0.9rem;line-height:1.4rem;color:rgb(51,51,51);font-family:'Open Sans','Helvetica Neue',Ubuntu,Arial,sans-serif">The <tt class="" style="background-color:transparent;font-weight:bold"><span class="">showPluginHelp`()</span></tt> function looks for help files in the same directory as the calling module. It will look for, in turn, <tt class=""><span class="">index-ll_cc.html</span></tt>, <tt class=""><span class="">index-ll.html</span></tt>, <tt class=""><span class="">index-en.html</span></tt>, <tt class=""><span class="">index-en_us.html</span></tt> and<tt class=""><span class="">index.html</span></tt>, displaying whichever it finds first. Here <tt class=""><span class="">ll_cc</span></tt> is the QGIS locale. This allows multiple translations of the documentation to be included with the plugin.</p>
<p style="margin:0px 0px 10px;font-size:0.9rem;line-height:1.4rem;color:rgb(51,51,51);font-family:'Open Sans','Helvetica Neue',Ubuntu,Arial,sans-serif">The <tt class="" style="background-color:transparent;font-weight:bold"><span class="">showPluginHelp()</span></tt> function can also take parameters packageName, which identifies a specific plugin for which the help will be displayed, filename, which can replace “index” in the names of files being searched, and section, which is the name of an html anchor tag in the document on which the browser will be positioned.</p>
<p style="margin:0px 0px 10px;font-size:0.9rem;line-height:1.4rem;color:rgb(51,51,51);font-family:'Open Sans','Helvetica Neue',Ubuntu,Arial,sans-serif"><br></p><p style="margin:0px 0px 10px;font-size:0.9rem;line-height:1.4rem;color:rgb(51,51,51);font-family:'Open Sans','Helvetica Neue',Ubuntu,Arial,sans-serif">
so tell me how could I open the file using python, ie. either a html file or chm file</p><div><br></div><div><br></div><div>Thanks & regards</div><div>Vishwadeep Shende</div></div>