[pygtk] query-tooltip problems

Johan Dahlin johan at gnome.org
Fri Jan 18 20:38:47 WST 2008

Gary Jaffe wrote:
> Hi Everyone --
> I want to catch when the mouse is hovered over a certain widget and call 
>  a method at the same time a tooltip popup would appear.
> So I connected the widget to the query-tooltip signal like this.
> widget.set_tooltip_text("Hello World!")
> widget.connect("query-tooltip", self.hover)
> But self.hover is called as soon as the mouse enters the widget's 
> allocation.  There is no delay.  There is, however, a delay for the 
> appearance of the tooltip.
> Does anyone know how can I call self.hover at the same time a tooltip 
> appears?

I think this is a delay internal to gtk+, and it's very likely set for a 
reason. You do want to wait a little bit (< 0.5 sec) before displaying the 
tooltips, otherwise you would just disturb the users who just want to use
the applications and are not interested in hints on how to use it.


More information about the pygtk mailing list