1、忽略證書錯誤提示,cef默認為false,但是并沒有彈窗提示要去選擇操作,所以會導致某一些需要驗證證書的界面打不開。
解決:
settings.ignore_certificate_errors = true;
2、本地化問題
解決:
const char* loc = "zh-CN";
CefString(&settings.locale).FromASCII(loc);
CefString(&settings.accept_language_list).FromASCII(loc);
cef_string_from_ascii(loc, strlen(loc), &settings.locale);
3、cef70中flash無法自動打開問題
void QCefRenderApp::OnBeforeCommandLineProcessing(const CefString &process_type, CefRefPtr<CefCommandLine> command_line)
{
//flash
command_line->AppendSwitchWithValue("enable-system-flash", "1"); //這一句就夠了
// command_line->AppendSwitchWithValue("ppapi-flash-version", "99.0.0.999");
// command_line->AppendSwitchWithValue("ppapi-flash-path", "plugins\\pepflashplayer64_32_0_0_344.dll");
}
4、編譯cef出錯
錯誤 1 error MSB3073: 命令“setlocal
mt.exe -nologo -manifest "E:/CEF_Source/cef81/tests/cefclient/resources/win/cefclient.exe.manifest" "E:/CEF_Source/cef81/tests/cefclient/resources/win/compatibility.manifest" -outputresource:"E:/CEF_Source/cef81/out/tests/cefclient/Debug/cefclient.exe";#1
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
setlocal
D:\CMake\bin\cmake.exe -E copy_if_different E:/CEF_Source/cef81/Debug/chrome_elf.dll E:/CEF_Source/cef81/out/tests/cefclient/Debug/chrome_elf.dll
if %errorlevel% neq 0 goto :cmEnd ...
解決辦法:根據(jù)
image.png
拷貝該文件下所有文件到指定文件夾即可。