Without being sure I would suggest that what you need is in your button's constructor to add
connect(this,SIGNAL(toggled(bool)),this,SLOT(changedState(bool));
connect(this,SIGNAL(toggled(bool)),this,SLOT(changedState(bool));
To copy to clipboard, switch view to plain text mode
in your .cpp
void HSPushButton::changedState(bool checked)
{
// do your checks here
// and if necessary
// emit (stateChanged(checked));
}
void HSPushButton::changedState(bool checked)
{
// do your checks here
// and if necessary
// emit (stateChanged(checked));
}
To copy to clipboard, switch view to plain text mode
Bookmarks