<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Few tooltip question]]></title><description><![CDATA[<p dir="auto">Hi everyone, I'm a new hand in qml, and my english is very poor.<br />
in my project, i have to implement a tooltip in some buttons.<br />
I saw some code here, and I found out this.<br />
<a href="http://qt-project.org/forums/viewthread/1686" target="_blank" rel="noopener noreferrer nofollow ugc">http://qt-project.org/forums/viewthread/1686</a><br />
In this code, the tooltip will show up when the mouse move into the mouse area.<br />
How can I make the tooltip show up when mouse move into the mouse area and stay in mouse area for 3 or 5 seconds?<br />
Is there is a signal or function can detect how long the mouse stay in a mouse area?</p>
<p dir="auto">Thank for every response</p>
]]></description><link>https://forum.qt.io/topic/16049/few-tooltip-question</link><generator>RSS for Node</generator><lastBuildDate>Mon, 21 Sep 2026 16:08:49 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/16049.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 20 Apr 2012 09:31:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Few tooltip question on Fri, 20 Apr 2012 10:25:27 GMT]]></title><description><![CDATA[<p dir="auto">thanks a lot!!<br />
that's very useful !!</p>
]]></description><link>https://forum.qt.io/post/136378</link><guid isPermaLink="true">https://forum.qt.io/post/136378</guid><dc:creator><![CDATA[lesner]]></dc:creator><pubDate>Fri, 20 Apr 2012 10:25:27 GMT</pubDate></item><item><title><![CDATA[Reply to Few tooltip question on Fri, 20 Apr 2012 10:13:12 GMT]]></title><description><![CDATA[<p dir="auto">I don't think there is a signal for that. But I suppose you could solve this by starting a "Timer":<a href="http://doc.qt.nokia.com/4.7-snapshot/qml-timer.html" target="_blank" rel="noopener noreferrer nofollow ugc">http://doc.qt.nokia.com/4.7-snapshot/qml-timer.html</a> when the mouse enters the area and interput it (using "stop()":<a href="http://doc.qt.nokia.com/4.7-snapshot/qml-timer.html#stop-method" target="_blank" rel="noopener noreferrer nofollow ugc">http://doc.qt.nokia.com/4.7-snapshot/qml-timer.html#stop-method</a>) if the mouse leaves before the Timer is finished. When the timer fires you just open the tooltip.</p>
]]></description><link>https://forum.qt.io/post/136375</link><guid isPermaLink="true">https://forum.qt.io/post/136375</guid><dc:creator><![CDATA[lycis]]></dc:creator><pubDate>Fri, 20 Apr 2012 10:13:12 GMT</pubDate></item><item><title><![CDATA[Reply to Few tooltip question on Fri, 20 Apr 2012 10:10:14 GMT]]></title><description><![CDATA[<p dir="auto">Hi lesner,<br />
You can use Timer and listen hoverd event in MouseArea like this:<br />
@    Timer {<br />
id: timer</p>
<pre><code>    repeat: false;
    running: false
    interval: 3000 // 3 sec.
    onTriggered: {
        console.log("show tip");
        button.hovered = true;
    }
}


    MouseArea {
        id: ma
        anchors.fill: parent
        hoverEnabled: true
        onHoveredChanged: {
            console.log(ma.containsMouse);
            if (ma.containsMouse) {
                timer.start();
            } else {
                button.hovered = false;
                timer.stop();
            }
        }
    }@
</code></pre>
]]></description><link>https://forum.qt.io/post/136373</link><guid isPermaLink="true">https://forum.qt.io/post/136373</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Fri, 20 Apr 2012 10:10:14 GMT</pubDate></item></channel></rss>