I'd like to display a tooltip when somebody selects an item from QComboBox.
My code is as follows:
def on_tooltip():
QToolTip.showText(
self._w.combo.mapToGlobal( QtCore.QPoint( 0, 0 ) ),
'my tooltip text',
w = self.w.combo,
msecShowTime=3000)
self.w.combo.activated.connect(on_tooltip)
msecShowTime
is totally ignored - as soon as the tooltip is displayed, it is closed immediately.
It doesn't matter if a pass the w
argument.
I am using PySide6 (6.4.0.1) on Windows platform.
Thanks!
I was also trying to replace activated
signal with overriding the mouseMoveEvent
and enabling setMouseTracking
(my widget is created using Qt Designer, so I cannot override my QComboBox object). But I am not receiving any events this way.