1
#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 ();


};
4

1 回答 1

3

Qt 使用 OpenSSL 库来处理 https 请求。

您是否安装了 OpenSSL 库?

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

于 2011-01-29T08:23:31.967 回答