I have a constructor that looks like:
scacfg(const QString &caption, QWidget *parent);
scacfg::scacfg(const QString &caption = "Click Me", QWidget *parent = nullptr) : QWidget(parent)
checkBox(new QCheckBox("Enabled")),
button(new QPushButton(caption)) {....}
and I'm trying to call it like this:
QStringList groups = sttngs->childGroups();
foreach (const QString grp, groups) {
scacfg *config = new scacfg(grp);
But the compiler complains about error: no matching function for call to ‘scacfg::scacfg(const QString&)’
scacfg *config = new scacfg(grp);
and I'm not sure why this is as defaults are provided in the prototype. If someone could explain, how I best resolve this, that would be appreciated!