<div dir="ltr"><div><div><div>For many widgets in a GUI I'm developing, I would like to add What's This documentation that contain links to online Sphinx-based documentation. In Designer, I can add whatsThis documentation with hyperlinks, but clicking the link in the resulting GUI doesn't do anything. Based on the documentation for QWhatsThis (<a href="http://pyqt.sourceforge.net/Docs/PyQt4/qwhatsthis.html">http://pyqt.sourceforge.net/Docs/PyQt4/qwhatsthis.html</a>), and some searching online (<a href="http://qt-project.org/forums/viewthread/34565">http://qt-project.org/forums/viewthread/34565</a>), my understanding is that I would need to reimplement the `event` method for each widget, perhaps along the lines of:<br><br></div>    def event(self, e):<br></div>        try:<br></div>            href = e.href()<br><div><div><div>            import webbrowser<br><div><div>            webbrowser.open_new_tab(href)<br></div><div>        except AttributeError:<br></div><div>            pass<br></div><div>        super(self.__class__, self).event(e)<br><br></div><div>On the other hand, I'm using Designer and uic.loadUi, so the prospect of subclassing numerous widgets is... I don't know how I would do it. And the prospect of rewriting the entire GUI programmatically to support this rather obvious use case makes me suspect I'm just doing it wrong.<br><br></div><div>Is it possible to plug in to PyQt's uic/loadUi routines to define the `event` method for every widget that gets instantiated? Or is there another approach I have overlooked?<br><br></div><div>Thanks,<br>Darren<br></div></div></div></div></div></div>