forked from jeena/FeedTheMonkey
18 lines
488 B
QML
18 lines
488 B
QML
import QtWebKit 3.0
|
|
import QtWebKit.experimental 1.0
|
|
|
|
WebView {
|
|
url: "content.html"
|
|
|
|
// Enable communication between QML and WebKit
|
|
experimental.preferences.navigatorQtObjectEnabled: true;
|
|
|
|
onNavigationRequested: {
|
|
if (request.navigationType != WebView.LinkClickedNavigation) {
|
|
request.action = WebView.AcceptRequest;
|
|
} else {
|
|
request.action = WebView.IgnoreRequest;
|
|
Qt.openUrlExternally(request.url);
|
|
}
|
|
}
|
|
}
|