It looks like you're new here. If you want to get involved, click one of these buttons!
I have an application that uses KLayout and its own GUI made with RBA.
I have had no luck turning tool tips on/off for my application. I can certainly
do it for a single widget, but not globally. My googling for the answer lead me
to suggestions of installing an eventFilter. However, in my version of Klayout,
0.24.2, there does not appear to be any way within Ruby to call the eventFilter on,
say, a QDialog. The eventFilter method exists in RBA but required arguments require
Qt forms not available in RBA.
Does anyone have a working Ruby solution for this?
Thanks so much for your consideration,
Dave
Comments
Hi Dave,
tooltips should only pop up if you design your widgets to have some. I think I don't really understand your problem. Do you want to have tool tips in general, but sometimes you don't want to see them popping up?
In general, event filtering is possible, but it's painful if applied to the application. You can basically create a global event filter this way:
But there are at least three cons:
So I can't recommend this solution. Filtering events on widgets is possible however.
Matthias
Thanks Matthias.
Yes, your assumption is correct. I have tool tips for nearly
everything in the application. Once users are comfortable with
the application, they normally click a checkbox to turn these
tips off - at least that's how it worked under WxWidgets. The
state of this checkbox is maintained between runs so a user
need only turn off tips once or may turn them back on as needed.
It seems this is a bit of a shortcoming with Qt.
Have you seen anyone parse the whole app widget tree of objects and
set/reset the tooltips from a string to an empty string? Surely it is brute force, but it may work without some of your listed cons.
I have another use for your event filter advice, so a double 'thank you' is in order.
Dave
Hi Dave,
So far I have not tried to educate users by giving too many tooltips :-)
I personally favour links inside the labels showing some help text. That is not annoying and within the help text popup you can shown a more elaborate document.
Coming back to your tool tips: I think you are using QFormBuilder to produce the user interface, are you? Maybe you could provide two versions of the .ui file - one for the beginner with the tooltips and another one for the expert (without tooltips). You could even generate the second one from the first one automatically - for example with a XSLT stylesheet like this:
Matthias
Some code that I hope will reduce my debt to others. It handles the tooltip problem.
Dave