I am preaty new with QT.
I want to respond to linkClicked in QWebView...
I tried connect like this:
QObject::connect(ui->webView,SIGNAL(linkClicked(QUrl)),MainWindow,SLOT(linkClicked(QUrl)));
But I was getting error: C:/Documents and Settings/irfan/My Documents/browser1/mainwindow.cpp:9: error: expected primary-expression before ',' token
When I do this using UI Editing Signals Slots:
I have in header file declaration of slot:
void linkClicked(QUrl &url);
in source cpp file :
void MainWindow::linkClicked(QUrl &url)
{
QMessageBox b;
b.setText(url->toString());
b.exec();
}
When I run this it compiles and runs but got a warning :
Object::connect: No such slot MainWindow::linkClicked(QUrl) in ui_mainwindow.h:100
What is propper way of doing this event handling?