Код: Выделить всё
#include
int main(int argc, char** argv)
{
const char* ch1 = "C:\\Users\\myname\\Documents\\Applis\\MyAppli\\x64\\Debug\\ressources\\myRessources_1.rcc";
std::string ch2 = "C:\\Users\\myname\\Documents\\Applis\\MyAppli\\x64\\Debug\\ressources\\myRessources_2.rcc";
std::wstring ch3 = L"C:\\Users\\myname\\Documents\\Applis\\MyAppli\\x64\\Debug\\ressources\\myRessources_3.rcc";
bool ok3 = QResource::registerResource(QString::fromStdWString(ch3));
bool ok2 = QResource::registerResource(QString::fromStdString(ch2));
bool ok1 = QResource::registerResource(QString(ch1));
return ok1 && ok2 && ok3;
}
Код: Выделить всё
ok1Подробнее здесь: https://stackoverflow.com/questions/794 ... its-a-qstr
Мобильная версия