update
This commit is contained in:
parent
4e4189a8ed
commit
b44855bf6e
28
compatibility.manifest
Normal file
28
compatibility.manifest
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||||
|
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<description>ctai</description>
|
||||||
|
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<security>
|
||||||
|
<requestedPrivileges>
|
||||||
|
<requestedExecutionLevel
|
||||||
|
level="asInvoker"
|
||||||
|
uiAccess="false"
|
||||||
|
/>
|
||||||
|
</requestedPrivileges>
|
||||||
|
</security>
|
||||||
|
</trustInfo>
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<!-- Windows 10 -->
|
||||||
|
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||||
|
<!-- Windows 8.1 -->
|
||||||
|
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||||
|
<!-- Windows Vista -->
|
||||||
|
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
|
||||||
|
<!-- Windows 7 -->
|
||||||
|
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||||
|
<!-- Windows 8 -->
|
||||||
|
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
</assembly>
|
||||||
36
src/main.cpp
36
src/main.cpp
@ -8,12 +8,9 @@
|
|||||||
#include "QCefWidget/CefWidget.h"
|
#include "QCefWidget/CefWidget.h"
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QString exeDir = QDir::currentPath();
|
|
||||||
QCoreApplication::addLibraryPath(exeDir+"/cef_binary/Release");
|
|
||||||
qDebug()<<"error:"<<exeDir;
|
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
QCefConfig config;
|
QCefConfig config;
|
||||||
config.setUserAgent("QCefViewTest");
|
config.setUserAgent("Mozilla/5.0 (Windows NT 10.0; CEF/3.2272.2035) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 SoftwareInformer/1.6.1400");
|
||||||
config.setLogLevel(QCefConfig::LOGSEVERITY_VERBOSE);
|
config.setLogLevel(QCefConfig::LOGSEVERITY_VERBOSE);
|
||||||
config.setBridgeObjectName("CallBridge");
|
config.setBridgeObjectName("CallBridge");
|
||||||
config.setBuiltinSchemeName("CefView");
|
config.setBuiltinSchemeName("CefView");
|
||||||
@ -22,25 +19,28 @@ int main(int argc, char *argv[])
|
|||||||
config.addCommandLineSwitch("use-alloy-style");
|
config.addCommandLineSwitch("use-alloy-style");
|
||||||
config.addCommandLineSwitch("off-screen-rendering-enabled");
|
config.addCommandLineSwitch("off-screen-rendering-enabled");
|
||||||
config.addCommandLineSwitch("multi-threaded-message-loop");
|
config.addCommandLineSwitch("multi-threaded-message-loop");
|
||||||
config.addCommandLineSwitch("external-message-pump");
|
//config.addCommandLineSwitch("external-message-pump");
|
||||||
config.addCommandLineSwitch("enable-chrome-runtime");
|
//config.addCommandLineSwitch("enable-chrome-runtime");
|
||||||
config.addCommandLineSwitch("enable-gpu");
|
//config.addCommandLineSwitch("enable-gpu");
|
||||||
config.addCommandLineSwitch("use-views");
|
//config.addCommandLineSwitch("use-views");
|
||||||
config.addCommandLineSwitch("site-per-process");
|
//config.addCommandLineSwitch("site-per-process");
|
||||||
config.addCommandLineSwitch("no-sandbox");
|
config.addCommandLineSwitch("no-sandbox");
|
||||||
config.addCommandLineSwitch("in-process-gpu");
|
//config.addCommandLineSwitch("in-process-gpu");
|
||||||
config.addCommandLineSwitch("use-mock-keychain");
|
config.addCommandLineSwitch("use-mock-keychain");
|
||||||
config.addCommandLineSwitchWithValue("ignore-certificate-errors","true");
|
config.addCommandLineSwitch("enable-chrome-runtime");
|
||||||
config.addCommandLineSwitchWithValue("enable-gpu-rasterizatio","true");
|
config.addCommandLineSwitch("start-stack-profiler");
|
||||||
config.addCommandLineSwitchWithValue("enable-accelerated-video","true");
|
//config.addCommandLineSwitchWithValue("type","gpu-process");
|
||||||
config.addCommandLineSwitchWithValue("use-fake-ui-for-media-stream","true");
|
//config.addCommandLineSwitchWithValue("ignore-certificate-errors","true");
|
||||||
config.addCommandLineSwitchWithValue("use-fake-device-for-media-stream","true");
|
//config.addCommandLineSwitchWithValue("enable-gpu-rasterizatio","true");
|
||||||
config.addCommandLineSwitchWithValue("renderer-process-limit", "1");
|
//config.addCommandLineSwitchWithValue("enable-accelerated-video","true");
|
||||||
config.addCommandLineSwitchWithValue("disable-features", "BlinkGenPropertyTrees,TranslateUI,site-per-process");
|
//config.addCommandLineSwitchWithValue("use-fake-ui-for-media-stream","true");
|
||||||
|
//config.addCommandLineSwitchWithValue("use-fake-device-for-media-stream","true");
|
||||||
|
//config.addCommandLineSwitchWithValue("renderer-process-limit", "1");
|
||||||
|
//config.addCommandLineSwitchWithValue("disable-features", "BlinkGenPropertyTrees,TranslateUI,site-per-process");
|
||||||
QCefContext cefContext(&a, argc, argv, &config);
|
QCefContext cefContext(&a, argc, argv, &config);
|
||||||
|
|
||||||
CefWidget cw;
|
CefWidget cw;
|
||||||
cw.show();
|
cw.show();
|
||||||
|
|
||||||
qputenv("QT_QPA_PLATFORM", "windows:fontengine=freetype");
|
qputenv("QT_QPA_PLATFORM", "windows:fontengine=freetype");
|
||||||
// 加载语言包
|
// 加载语言包
|
||||||
QTranslator qtBaseTranslator;
|
QTranslator qtBaseTranslator;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user