i'm new qt , i'm trying work signals , slots , i'm having bit of trouble creating custom slots:
public slots: void reseturl(){ this->load(qurl("http://www.google.com")); }
(then, in 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 got, appreciated. says when try run "'class google' has no member named 'load'".
i'm sure class has no load function, want web->load(url)
not this->load(url)