Hi.,
in my project i added Custom Widget inherit from QWidget class. the shape is Circle. i added this widget in to the parent Widget.
if the custom button clicked then how to find which button clicked?
Adding custom button to Parent Widget:
void ShotViewCTRL::addShot(QString shotNanme)
{
ShotButton *btnShot=new ShotButton(this);
btnShot->shotName=shotNanme;
connect(btnShot,SIGNAL(Shot_Selected()),this,SLOT(SHOT_CLICKED()));
btnShot->CreateButton();
btnShot->show();
}
my parent widget is "ShotViewCTRL"(inherit from QWidget). child widget is "ShotButton" (custom control, inherit from Qwidget)
Control working fine. it's sending sending to parent object. in my problem i added same custom control 10 times.
i need to find which control is clicked? Please help me to find the solution.
i refered the Qt documentation to find the Child Widget, but i did't understand. please any one having some code sample that's great.