[Qt-interest] Tracking mouse over label
Cole, Derek
dcole at integrity-apps.com
Thu Jan 20 18:46:06 CET 2011
Ah - I see. I was able to create an event Filter to do the job.
Thanks for the tips in the right direction!
-----Original Message-----
From: qt-interest-bounces+dcole=integrity-apps.com at qt.nokia.com on behalf of Nikos Chantziaras
Sent: Thu 1/20/2011 12:41 PM
To: qt-interest at qt.nokia.com
Subject: Re: [Qt-interest] Tracking mouse over label
On 01/20/2011 07:36 PM, Jason H wrote:
> I thought you also had to turn mouse move events on, otherwise you only get
> button/focus/drag events? I think by default you don't get the move events.
That's what "tracking" is.
> ----- Original Message ----
> From: Bo Thorsen<bo at fioniasoftware.dk>
> To: qt-interest at qt.nokia.com
> Sent: Thu, January 20, 2011 12:23:06 PM
> Subject: Re: [Qt-interest] Tracking mouse over label
>
> Den 20-01-2011 18:20, Nikos Chantziaras skrev:
>> On 01/20/2011 07:15 PM, Cole, Derek wrote:
>>> I have a label that I am using to display a QPixmap. I want to be able
>>> to track the mouse any time it is crossing over the QLabel to give me
>>> the XY coordinates of the image. I see that there is a mouseTracking
>>> checkbox in QtCreator that I checked, but how do I get the mouseover
>>> event on the label?
>> You need to subclass from QLabel and reimplement the event handler.
>
> Or set an event handler if you don't want to subclass just to get those
> coordinates.
>
> Bo Thorsen,
> Fionia Software.
>
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110120/c886c3f8/attachment.html
More information about the Qt-interest-old
mailing list