Solved How to invoke slot on widget?
-
I have added a slot to the clicked signal of a QCheckBox, I want to use the slot which is Lambda to set-up the initial widgets, is there a way to trigger a call of the checkbox clicked signal programmatically?
-
@SPlatten , sorted:
QMetaObject::invokeMethod(mpui->pcbMonShowRx, "clicked", Qt::QueuedConnection, Q_ARG("clicked", false));
-
@SPlatten , sorted:
QMetaObject::invokeMethod(mpui->pcbMonShowRx, "clicked", Qt::QueuedConnection, Q_ARG("clicked", false));
-
For public signals, directly emitting is an option.
emit mpui->pcbMonShowRx.clicked(false);