Skip to content

Instantly share code, notes, and snippets.

@diorahman
Created February 27, 2012 23:48
Show Gist options
  • Select an option

  • Save diorahman/1927963 to your computer and use it in GitHub Desktop.

Select an option

Save diorahman/1927963 to your computer and use it in GitHub Desktop.
Silence
import QtQuick 1.1
import QtWebKit 1.0
import com.nokia.meego 1.0
Page {
id: root
tools: commonTools
WebView {
javaScriptWindowObjects: QtObject {
WebView.windowObjectName: "qml"
function qmlCall() {
console.log("This call is in QML!");
}
}
html: "<script>console.log(\"This is in WebKit!\"); window.qml.qmlCall(); alert('yeah')</script>"
}
}
@diorahman
Copy link
Copy Markdown
Author

The output is only "This call is in QML!"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment