Created
September 4, 2014 09:14
-
-
Save aeroaks/797d33e07419fbb87e34 to your computer and use it in GitHub Desktop.
GTK Webkit2 Browser - simple single window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from gi.repository import Gtk | |
from gi.repository import WebKit2 | |
# initialize WebView | |
view = WebKit2.WebView() | |
# initialize Scrolled Window | |
sw = Gtk.ScrolledWindow() | |
sw.add(view) | |
# initialize GTK Window | |
win = Gtk.Window() | |
# destroy signal - to terminate the program neatly | |
win.connect("destroy", Gtk.main_quit) | |
win.add(sw) | |
win.show_all() | |
# open url | |
view.load_uri("http://en.wikipedia.org/") | |
# Start Window | |
Gtk.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment