enthought / enthought/pyface

Menu action tooltips don't show

Open
#753 1 comment 0 reactions 0 assignees View on GitHub
toolkit: Qt type: bug
Dominant language
Python
Stars
115
Forks
54
PR merge metrics
No merged PRs in 30d

Description

When running the `examples/tasks/advanced/run.py`, even after adding tooltips to `TaskAction`s, these tooltips don't appear on hover on the menu. For Qt>5.1, they should per [this](https://doc.qt.io/qt-5/qmenu.html#toolTipsVisible-prop). Marking this as a bug since `Action` objects have tooltip attribute but they don't show up when set. It aguably could be an enhancement too.

Per https://stackoverflow.com/questions/21725119/why-wont-qtooltips-appear-on-qactions-within-a-qmenu, apparently, 2 things must happen:
- The QAction must call `setToolTip` which I believe is done [here](https://github.com/enthought/pyface/blob/master/pyface/ui/qt4/action/action_item.py#L94)
- The QMenu must call `setToolTipsVisible(True)` which I think is missing from the `_Menu` class (https://github.com/enthought/pyface/blob/master/pyface/ui/qt4/action/menu_manager.py).

Seen with python 3.6 on current master on OSX (w/ traitsui 7.0.1-1, traits 6.1.0-1, qt 5.12.6-5, pyqt5 5.14.2-3).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.