On Mon, 11 Jul 2016 08:33:14 -0700
Segundo Bob <[email protected]> wrote:

> On 07/10/2016 06:23 PM, 'Terry Brown' via leo-editor wrote:
> > The idea of tooltips for menu items in Leo came
> > up some time ago, and I don't think it's directly supported in Qt.
> 
> Terry,
> 
> Qt does support tooltips for menu items.  I use this feature often.
> The tooltip is displayed when you mouse over the menu item.
> 
> actTDL = QtWidgets.QAction(sc + labelValueHint.label, self)
> if hint is not None:
>     actTDL.setToolTip(labelValueHint.hint)

Hmm, this wasn't working for me in Qt 4 or 5.  The tool tip never
appears, and the info. at 
https://wiki.qt.io/Qt_project_org_faq#How_can_I_add_tooltips_to_actions_in_menus.3F
seems correct.

Following the subclass and intercept event path from the above link, I
also notice that there's a significant delay in the tool-tip even
firing, which might not be ideal for tfer's "browsing functionality"
use case.  Fix for the delay seems to be to use the on-enter event or
mouse tracking, but that's tricky for menu items because they're not
first class widgets.

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to