QToolTip doesn't update when text is changed while tooltp is shown
QLineEdit - if I change tooltip with setTooltip(QString&) while tooltip is shown - it doesn't update the text that is shown immediately. I must move away the focus, wait for tooltip to hide then hover back over QLineEdit and only then the new text is shown!?
- Is this a known bug?
- Is this by design?
- How to access actual QToolTip object? QLineEdit has tooltip()/setTooltip() but they work with QString only - QTooltip has methods to force hide/show?
- any other ideas...
How to force the linedit1's toolltip when it is showing to update its text immediately after linedit1.setTooltip("new text");
I've tried: repaint(), update(), setTooltip("") -> setTooltip("new text") all to no avail.
1 Not a bug
2 I don't know about by design, but definitely not an intended use model
3 the ToolTip object used by the Widget is not accessible. From looking at QToolTip docs it is just a set of static methods.
4 Other ideas
I have not tried this personally. Try sending a QHelpEvent to the widget after you change the text you want displayed. You might need to rewrite the event handler to remove the old one first.