Hi,
I've added an optional parameter in the the on_pushButton_clicked() SLOT. The related code:
private slots:
void on_pushButton_clicked(bool isFree = false);
private slots:
void on_pushButton_clicked(bool isFree = false);
To copy to clipboard, switch view to plain text mode
void myClass::on_pushButton_clicked(bool isFree)
{
if (isFree)
{
// Do something
}
else
{
// Do something for not free
}
}
void myClass::on_pushButton_clicked(bool isFree)
{
if (isFree)
{
// Do something
}
else
{
// Do something for not free
}
}
To copy to clipboard, switch view to plain text mode
The code works well but I get the next warning:
QMetaObject::connectSlotsByName: No matching signal for on_pushButton_clicked(bool)
Is it possible make some changes to avoid this warning?
Regards.
Bookmarks