Red Hat Enterprise Linux 5.2에서 공유 라이브러리에 선언되어 사용 된 Qt 리소스를 초기화하는 방법을 알 수 없습니다.Qt 리소스를 공유 라이브러리에서 초기화하는 방법은 무엇입니까?
공유 라이브러리에 Qt 리소스 파일을 추가하고 "resource"라는 접두사를 추가하고 "files/styleSheet.xsl"파일을 추가했습니다. 리소스 파일의 이름은 "resources.qrc"입니다. QFile :: exists가 false를 반환합니까? 어떤 조언이나 제안에 미리
MySharedLib::MySharedLib()
{
// I think Q_INIT_RESOURCE basically expands to this:
// The resource file is named "resources.qrc"
extern int qInitResources_resources();
qInitResources_resources();
QString resourcePath = ":/resource/files/styleSheet.xsl";
if(false == QFile::exists(resourcePath))
{
printf("*** Error - Resource path not found : \"%s\"\n", resourcePath.toLatin1().data());
}
}
감사합니다,
관련 항목 : [Plugin (.so)의 Qt UI (이미지 포함)] (http://stackoverflow.com/questions/5097087/) –
궁금한 점이 있으시면 문제를 해결할 수 있었습니까? 나는 매우 비슷한 문제를 가지고 있으며 해결책을 찾을 수 없다. – DRAX