[PyQt] Modifying tooltip before it is shown

detlev detlev at die-offenbachs.de
Sat Apr 24 18:17:55 BST 2010


On Samstag, 24. April 2010, Matt Newell wrote:
> On Saturday 24 April 2010 03:53:46 detlev wrote:
> > Hi,
> >
> > I would like to show the keyboard shortcut for a QAction in the tooltip.
> > What would be the best way to amend the tooltip just before it is shown?
> >
> > Regards,
> > Detlev
> 
> You can intercept QWidget's ToolTip event 

I can't find a documentation of this event method.

> and change the tooltip text
>  there. Unfortunately there is no event delivered to QActions, only
>  QWidgets, so it may take some work depending on what widget is handling
>  the QAction.
> 
> Matt
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
> 


-- 
Detlev Offenbach
detlev at die-offenbachs.de


More information about the PyQt mailing list