QWebView没有使用Qt 4.7加载https://www.gmail.com?

时间:2011-01-29 07:40:52

标签: qt qwebview

#include <QtGui/QApplication>
#include "browser.h"
#include <QtNetwork/QSslSocket>

int main(int argc, char *argv[])
{

    QApplication a(argc, argv);

    Browser b;
    b.setGeometry(0,0,700,700);
    b.load(QUrl("https://www.gmail.com"));
    b.show();

    return a.exec();
}

class Browser : public QWebView
{
    Q_OBJECT
public:
    explicit Browser(QWidget *parent = 0) {}

signals:

    void loadFinished ( bool ok );
    void    loadProgress ( int progress );
    void    loadStarted ();

public slots:
    void loadFinishedSlot ( bool ok );
    void    loadProgressSlot ( int progress );
    void    loadStartedSlot ();


};

1 个答案:

答案 0 :(得分:3)

Qt将OpenSSL库用于https请求。

您安装了OpenSSL库吗?

http://gnuwin32.sourceforge.net/packages/openssl.htm