I have a custom QGraphicsItem
with a QToolTip
. When hovering with the mouse on them the tool tip shows fine, but there is a small delay before the tool tip shows.
How can I decrease that delay, so the tool tip will show immediately?
In the documentation for QWidget::mouseMoveEvent(QMouseEvent*)
you can read the following description:
If you want to show a tooltip immediately, while the mouse is moving (e.g., to get the mouse coordinates with
QMouseEvent::pos()
and show them as a tooltip), you must first enable mouse tracking as described above. Then, to ensure that the tooltip is updated immediately, you must callQToolTip::showText()
instead ofsetToolTip()
in your implementation ofmouseMoveEvent()
.
But instead of using the mouseMoveEvent
, you could also use the QWidget::enterEvent(QEvent*)
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With