LPCWSTR path;
void WinApiLibrary::StartProcess(QString name)
{
path = name.utf16();
CreateProcess(path, NULL, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
}
Run Code Online (Sandbox Code Playgroud)
C:\ kursovaya\smc\winapilibrary.cpp:21:错误:从'const ushort*{aka const short unsigned int*}'无效转换为'LPCWSTR {aka const wchar_t*}'[-fpermissive] path = name.utf16 ();
这段代码在Qt 4.8中工作,但现在我有Qt 5.2,这段代码不起作用.这家伙怎么了?
qt ×1