Hi,
I have an aplication that consists in a window with several widgets, such as buttons and labels. I would like to get the mouse clicking events that occur in one of the labels. Do I have to create a custom label to get these mouse events?
Thanks
Hi,
I have an aplication that consists in a window with several widgets, such as buttons and labels. I would like to get the mouse clicking events that occur in one of the labels. Do I have to create a custom label to get these mouse events?
Thanks
You can install an event filter and catch the events and handle them. See QObject::installEventFilter().
Maluko_Da_Tola (25th August 2010)
Do you know of any good tutorial on event filters?
Cheers
I found the description in the doc right under QObject::installEventFilter() useful enough but you can also have a look at http://www.qtrac.eu/marksummerfield.html and download the free 1st edition of C++ GUI Programming with Qt 4 and read the chapter about event processing.
Maluko_Da_Tola (25th August 2010)
Bookmarks