Properly implement slot, connect signal from the object which actually sends it to the slot
authorunc0rr
Tue, 16 Aug 2011 21:57:58 +0400
changeset 5582 48ced03a9949
parent 5581 cc43f382ed9a
child 5583 63b274a4fb01
Properly implement slot, connect signal from the object which actually sends it to the slot
QTfrontend/pagedata.cpp
QTfrontend/pagedata.h
--- a/QTfrontend/pagedata.cpp	Mon Aug 15 16:57:36 2011 -0400
+++ b/QTfrontend/pagedata.cpp	Tue Aug 16 21:57:58 2011 +0400
@@ -35,7 +35,7 @@
     BtnBack = addButton(":/res/Exit.png", pageLayout, 1, 0, true);
 
     web = new QWebView(this);
-    connect(this, SIGNAL(linkClicked(const QUrl&)), this, SLOT(install(const QUrl&)));
+    connect(web, SIGNAL(linkClicked(const QUrl&)), this, SLOT(install(const QUrl&)));
     web->load(QUrl("http://m8y.org/hw/downloads/"));
     web->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
     pageLayout->addWidget(web, 0, 0, 1, 3);
--- a/QTfrontend/pagedata.h	Mon Aug 15 16:57:36 2011 -0400
+++ b/QTfrontend/pagedata.h	Tue Aug 16 21:57:58 2011 +0400
@@ -32,7 +32,7 @@
     QPushButton *BtnBack;
     QWebView *web;
 
-private:
+private slots:
     void install(const QUrl &url);
 };