QWebview not loading

QWebview not loading

本文关键字:loading not QWebview      更新时间:2023-10-16

在我的Qt项目中,我有一个初始化的QWebView,我创建它,加载一个url,然后显示它。这在一段时间前是有效的,但现在它已经停止加载了。

相关代码:

void MainWindow::activateWebView()
{
    webview = new QWebView();
    QUrl link("https://accounts.google.com/o/oauth2/auth?client_id=724514964748-43gb17l2laj7mg3vcj2qpfe7o6fn4ceu.apps.googleusercontent.com&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=https://www.googleapis.com/auth/youtube&response_type=code&access_type=offline");
    connect(webview, SIGNAL(loadFinished(bool)), this, SLOT(webViewloadFinished(bool)));
    webview->setWindowTitle("Connecting to Google...");
    connect(webview, SIGNAL(titleChanged(QString)), webview, SLOT(setWindowTitle(QString)));
    webview->setMinimumSize(600, 700);
    webview->setMaximumSize(600, 700);
    webview->setWindowModality(Qt::WindowModal);
    webview->show();
    webview->load(link);
}

我想明白了。从上一次成功构建到最近一次失败构建,我都重新安装了操作系统。这显然导致了一些SSL dll出现问题。我在我的MinGW 中丢失了三个文件

  • libssl32.dll
  • ibeay32.dll
  • ssley32.dll

我在OpenSSL的安装中找到了这些文件。我将这些文件添加到我的MinGW bin文件夹中,现在它正在工作!