1
C는 QObject 파생 클래스이므로 성공적으로 사용할 수 있습니다.QObject :: connect는 컴파일시에 객체를 "거부"합니다.
"연결"에 컴파일 오류가 발생합니다. "this-> controller"를 "this"로 변경하면 대상에서 정상적으로 작동합니다. 수신자가 this-> 컨트롤러에 대해 뭔가 컴파일하지 못하게합니다. 나는 그것이 어리석은 무엇인가 틀림 없음을 깨닫는다. 그러나 원인은 나를 피한다. ..
MyClass::MyClass(C * controller)
: QThread(NULL)
{
this->controller = controller;
QObject::connect(this, SIGNAL(OnResponse(ResponseClass*)), this->controller, SLOT(OnResponse(ResponseClass*))); // <---- "Compiler error: " error: no matching function for call to...."
}
이 컨트롤러의 선언은 무엇입니까? –