I have a button for my web browser using Qt Designer, but I need to assign a slot that will load the default webpage.
I have tried:
ui->webView->load(ui->webView->url());
But, it would have the same effect as reload. Any help is appreciated?
By the way, this is not a homework, but a home project that is being done for fun.
Thank you!
Not sure what you mean by “default webpage”, but what you need to do is, e.g.
substitute “http://www.google.com” with the web page you want to load.
For a QWebView defined in Qt designer where you specified an url, it will be loaded when you instantiate the form, you don’t need to load it yourself via a slot.