Hi,
I'm using QWebView with the signal LoadFinished but I have the error:
/home/david/proyectos qt/networkacessmanager/red/mainwindow.cpp:17: error: no matching function for call to ‘MainWindow::connect(QWebView&, const char*, MainWindow* const, const char*)’
/home/david/proyectos qt/networkacessmanager/red/mainwindow.cpp:17: error: no matching function for call to ‘MainWindow::connect(QWebView&, const char*, MainWindow* const, const char*)’
To copy to clipboard, switch view to plain text mode
The code is:
Mainwindow.cpp
MainWindow
::MainWindow(QWidget *parent
){
ui->setupUi(this);
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
manager
->get
(QNetworkRequest
(QUrl("http://qt.nokia.com")));
QWebView webview;
webview.
setUrl(QUrl("http://www.google.com"));
connect(webview,SIGNAL(loadFinished(bool)), this, SLOT(salida(bool)));
.......
}
void MainWindow::salida(bool ok)
{
ok = false;
}
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent), ui(new Ui::MainWindow)
{
ui->setupUi(this);
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
manager->get(QNetworkRequest(QUrl("http://qt.nokia.com")));
QWebView webview;
webview.setUrl(QUrl("http://www.google.com"));
connect(webview,SIGNAL(loadFinished(bool)), this, SLOT(salida(bool)));
.......
}
void MainWindow::salida(bool ok)
{
ok = false;
}
To copy to clipboard, switch view to plain text mode
mainwindow.h
{
....
....
private slots:
void salida(bool ok);
class MainWindow : public QMainWindow
{
....
....
private slots:
void salida(bool ok);
To copy to clipboard, switch view to plain text mode
Any help?
Many thanks!
Bookmarks