@Vikram, Thanks but in this way i lost id number of each object for example by this, that you told, i can know sender is from Class1 but which object of this class send? by "void setMapping(QObject * sender, int id)" i can know object number and i can not know this object is from which class. now I could know which object (id) send and can not know this is from which class. One idea is I define 2 objects of QSignalMapper for each class (then i have 10 objects of QSignalMapper like:
pushbutton_id_signalMapper
->setMapping
(QObject * sender,
int id
) pushbutton_type_signalMapper
->setMapping
(QObject * sender,
QWidget * widget
)
chekbox_id_signalMapper
->setMapping
(QObject * sender,
int id
) chekbox_type_signalMapper
->setMapping
(QObject * sender,
QWidget * widget
).
.
.
spnbox_id_signalMapper->setMapping
(QObject * sender,
int id
) spnbox_type_signalMapper
->setMapping
(QObject * sender,
QWidget * widget
)
pushbutton_id_signalMapper->setMapping(QObject * sender, int id)
pushbutton_type_signalMapper->setMapping(QObject * sender, QWidget * widget)
chekbox_id_signalMapper->setMapping(QObject * sender, int id)
chekbox_type_signalMapper->setMapping(QObject * sender, QWidget * widget)
.
.
.
spnbox_id_signalMapper->setMapping(QObject * sender, int id)
spnbox_type_signalMapper->setMapping(QObject * sender, QWidget * widget)
To copy to clipboard, switch view to plain text mode
If I used QWidget * widget for identifying the class type, by what function I can know sender type? I mean when for example sender is PushButton then how can I know this:
pushbutton_type_signalMapper->whatIsThisFunctionThatTellUsTheClassTypeToUseInsideSlot()//what function?
pushbutton_type_signalMapper->whatIsThisFunctionThatTellUsTheClassTypeToUseInsideSlot()//what function?
To copy to clipboard, switch view to plain text mode
thanks for any help!!!
Bookmarks