[PyQt] Modifying tooltip before it is shown

Matt Newell newellm at blur.com
Sat Apr 24 17:31:04 BST 2010


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 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


More information about the PyQt mailing list