Quote Originally Posted by d_stranz View Post
Come on, quit screwing around here. Your original post asked how to connect a signal and slot between two QListWidget instances. The final code I posted would do that, using a lambda function instead of an actual slot. Now you say, I didn't want to connect to another list widget after all, I wanted to connect the list widget to a QPlainTextEdit.

You need to remember some basic C++. Signals and slots are no different from ordinary methods of C++ classes. They are labeled with "signals:" and "slots:" keywords in Qt so that the MOC compiler can recognize them and create the code in the moc_*.cpp file that implements them and makes the first style of connect() work at runtime. A lambda function is just a fancy way to write a nameless C++ function that gets compiled in place.

All the rules of C++ apply to signals, slots, and lambdas: If you want to call one of these functions, you have to supply the correct number and types of arguments to it. You can't call a function that expects one type of pointer using an argument that is a different type. It's basic C++, pure and simple.
Sorry, but my objective, in case I did not say it - is to replace QtDesigner signal / slot in XML with C++ code.
The XML works by coping a string from list and appending it to plain text.

I initially started with list to list and have been getting "invalid function " when using "addItem", even when intelisense lets me use "addItem".
So I assumed I am using wrong syntax and still like to verify my mistake, irregardless if passing between item or plain text.
At this point I am not interested in bypassing my error using lambda - if XML works so should new or old style C++ "connect" work.