PDA

View Full Version : Mouse events in multiple labels



2lights
6th January 2014, 06:52
Good Day,

I have promoted a label (Label_1) to a class that incorporates
mouse functions(mouse position, mouse clicked and so forth).

I have multiple labels that should do the same functionality as the "label_1",
however different signals must be passed when using different labels

How do I promote more than 1 label to a class, yet I know which label is being used to pass the different signals.
Or do I have to create multiple classes for each label.

Whats the way forward...
Much appreciated

Kind Regards

ChrisW67
6th January 2014, 07:36
QSignalMapper (at least I think that is what your post was trying to ask).

anda_skoa
6th January 2014, 10:42
Alternatively, since this is your own subclass, just let your signals contain whatever data you need to differentiate the source.

Cheers,
_