Skip to content

Instantly share code, notes, and snippets.

@denysonique
Created August 25, 2011 14:02
Show Gist options
  • Save denysonique/1170735 to your computer and use it in GitHub Desktop.
Save denysonique/1170735 to your computer and use it in GitHub Desktop.
require 'Qt4'
require 'qtwebkit'
app = Qt::Application.new(ARGV)
web_view = Qt::WebView.new
web_view.load(Qt::Url.new('http://nightly.webkit.org'))
web_view.show()
web_view.page.linkDelegationPolicy = 2
web_view.connect(SIGNAL "linkClicked(const QUrl)") { |url|
print "You have clicked the url: #{url.host}#{url.path}"
}
app.exec()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment