I have briefly scanned this
https://en.cppreference.com/w/cpp/language/lambda
https://en.cppreference.com/w/cpp/language/lambda
To copy to clipboard, switch view to plain text mode
link
and managed to find the missing ";" .
Now I am getting this error
/media/f/QT/Qt/QT/qtconnectivity/examples/bluetooth/CAT_BT_18112020/device.cpp:181: error: no matching function for call to 'DeviceDiscoveryDialog::connect(QListWidget*&, void (QListWidget::*)(QListWidgetItem*), DeviceDiscoveryDialog*, DeviceDiscoveryDialog::DeviceDiscoveryDialog(QWidget*)::<lambda(QListWidgetItem*)>)'
[this]( QListWidgetItem * pItem
) { this
->ui
->list_2
->addItem
( pItem
);
}) ;
^
/media/f/QT/Qt/QT/qtconnectivity/examples/bluetooth/CAT_BT_18112020/device.cpp:181: error: no matching function for call to 'DeviceDiscoveryDialog::connect(QListWidget*&, void (QListWidget::*)(QListWidgetItem*), DeviceDiscoveryDialog*, DeviceDiscoveryDialog::DeviceDiscoveryDialog(QWidget*)::<lambda(QListWidgetItem*)>)'
[this]( QListWidgetItem * pItem ) { this->ui->list_2->addItem( pItem ); }) ;
^
To copy to clipboard, switch view to plain text mode
I think I can fix that myself, (perhaps intelisense will help ) but I need to quit for today.
Thanks for your help.
QObject::connect(ui
->list,
//object &QListWidget::itemClicked, //signal
this, //object
[this]( QListWidgetItem * pItem
) { this
->ui
->list_2
->addItem
( pItem
);
}) ;
QObject::connect(ui->list, //object
&QListWidget::itemClicked, //signal
this, //object
[this]( QListWidgetItem * pItem ) { this->ui->list_2->addItem( pItem ); }) ;
To copy to clipboard, switch view to plain text mode
Bookmarks