You are trying to call a load()
method of your webview
class here:
void resetUrl(){
this->load(QUrl("http://www.google.com"));
}
However, your class is derived from QMainWindow
:
class webview : public QMainWindow
Both the base class, and your derived class indeed do not have any load()
method. You should derive your webview
class from QWebView
instead of QMainWindow
. In this case, the base class' load()
method will be called, and it will work fine.