I am trying to send two parameters in a Slot but i get the following error.
'layoutProperty' cannot be implicitly captured because no default capture mode has been specified
'layoutProperty' is a QVBoxLayout.
void Container::CreatePositionAnimationUI(QHBoxLayout *layout1 ,
QHBoxLayout *layout2 , QHBoxLayout *layout3 , QVBoxLayout
*layoutProperty )
{
QPushButton *pushButtonKey1 = new QPushButton;
QPushButton *pushButtonKey2 = new QPushButton;
QPushButton *pushButtonKey3 = new QPushButton;
layout1->addWidget(pushButtonKey1);
layout2->addWidget(pushButtonKey2);
layout3->addWidget(pushButtonKey3);
QObject::connect(pushButtonKey1, &QPushButton::clicked , this,
[this] {SetPositionKeyGUIParameters(1 ,layoutProperty); }); // Get error on this line
}