错误代码:
//main.cpp int main() { ... QCefBrowser w; w.show(); CefRunMessageLoop(); CefShutdown(); ... }
修改为:
//main.cpp int main() { ... QCefBrowser *w = new QCefBrowser; w->show(); CefRunMessageLoop(); CefShutdown(); ... } //QCefBrowser.cpp QCefBrowser::QCefBrowser(QWidget* parent) :QWidget(parent) { setAttribute(Qt::WA_DeleteOnClose); }
具体不知道是什么原因...
找bug找得神志不清了都,淦