I'm fairly new to Qt and I'm trying to work with Signals and Slots and I'm having a bit of trouble creating custom Slots:
public slots:
void resetUrl(){
this->load(QUrl("http://www.google.com"));
}
(Then, in my main.cpp)
#include <QWebView>
#include <QPushButton>
QWebView *web = new QWebView(mainwindow);
QPushButton *button = new QPushButton(mainwindow);
web->load(QUrl("http://www.yahoo.com"));
button->setText("Google");
QObject::connect(button, SIGNAL(clicked()), web, SLOT(resetUrl()));
Thats about all I got, any help is appreciated. What it says when I try to run this is "'class google' has no member named 'load'".
I'm sure your class has no load function, you want
web->load(url)
NOTthis->load(url)