View Full Version : Installing event filter for What's This tool tip...

18th September 2012, 20:21
Good afternoon --

Recently I was asked to add a help feature to an application that I've been working on forever, and I found a great "What's This?" example in the book Foundations of Qt Development by Johan Thelin in Chapter 9. I have implemented it almost exactly verbatim for the embedded links with the only difference that I'm displaying a HTML file in a QWebView popup dialog, but exiting that dialog is crashing my app with a EXC_BAD_ACCESS when running on a Mac (this looks like it could be bug 20652 because everything works fine in Windows but I haven't concluded that yet). Just for testing reasons I replaced the QWebView dialog with the example that's in the book and it still occurs, so I've started to try to pull the example apart piece by piece which has led me to a question.

I have never used event filters before and I notice the example installs the filter on the parent dialog but that seems like overkill -- is it necessary to do that or should I just install it for the widgets that I want a help dialog to appear for?



ps -- my HTML file is generated from a PDF; if I could get QDesktopServices::openUrl to jump to a certain page in the PDF then I could jettison this whole approach but I'm not there yet with that solution either...