#include<QMetaType>
typedef QList<int> IntList;
qRegisterMetaType<IntList>("IntList");
error C2909: 'qRegisterMetaType': explicit instantiation of function template requires return type
C2909 내가 정의하면 그때 위에서 언급 한 것처럼 나는이 오류가 왜 나는 아래의 오류qRegisterMetaType 사용은
error C2059: syntax error : 'string'
warning C4667: 'int qRegisterMetaType(void)' : no function template defined that matches forced instantiation
을 얻을
template int qRegisterMetaType<IntList>("IntList");
를 정의 할 필요가 말한다?
헤더 파일에서 이러한 유형을 선언하고 있습니다. 함수 내에서 같은 것을 선언 할 때 main()이라고 말하십시오. 이 컴파일 오류가 발생하지 않습니다. – Srikan