Sorry, I am typing faster than I am thinking. Try this:
QObject::connect(ui
->list,
//object &QListWidget::itemClicked, //signal
[this]( QListWidgetItem * pItem
) { this
->ui
->list_2
->addItem
( pItem
);
}) ;
// lambda slot
QObject::connect(ui->list, //object
&QListWidget::itemClicked, //signal
[this]( QListWidgetItem * pItem ) { this->ui->list_2->addItem( pItem ); }) ; // lambda slot
To copy to clipboard, switch view to plain text mode
There is no "receiver" pointer (the normal third argument to connect()) when using a connect() with the lambda syntax.
Bookmarks