lamera
9th October 2008, 14:39
hi!
I've got an application which shows a list of links in QTextBrowser, but if the user clicks one of them I want them to appear in a different - QWebView, not in QTextBrowser, I want the QTextBrowser to remain the same.
so I've done:
QWebView *webview;
QTextBrowser *browser;
connect(browser, SIGNAL(sourceChanged(QUrl &)), this, SLOT(showLink(QUrl &)));
and then:
showLink(const QUrl &link)
{
webview->load(QUrl(link));
webview->show();
}
anyway it doesn't work.
So I subclassed QTextBrowser and modified setSource() to do nothing. Still doesn't work...
thanks for any help.
I've got an application which shows a list of links in QTextBrowser, but if the user clicks one of them I want them to appear in a different - QWebView, not in QTextBrowser, I want the QTextBrowser to remain the same.
so I've done:
QWebView *webview;
QTextBrowser *browser;
connect(browser, SIGNAL(sourceChanged(QUrl &)), this, SLOT(showLink(QUrl &)));
and then:
showLink(const QUrl &link)
{
webview->load(QUrl(link));
webview->show();
}
anyway it doesn't work.
So I subclassed QTextBrowser and modified setSource() to do nothing. Still doesn't work...
thanks for any help.