I am trying to use this statement . I am using QT 5.1 in VS2012
connect(ui.pushButton_next, SIGNAL(clicked()), []{
std::cout << "clicked" << std::endl;
});
I get
error C2664: 'QMetaObject::Connection QObject::connect(const QObject *,const char *,const char *,Qt::ConnectionType) const' : cannot convert parameter 3 from 'newAccount::{ctor}::' to 'const char *' 1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Any suggestion on what I might be doing wrong ?
uia pointer? And NO, you cannot use the old syntax with a lambda, you have to use the new connect syntax. - dtechuithat Qt generates in such cases is a pointer. - dtech