From 6d5d539a859cae43a1e97acd6fc5675d45b09063 Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 21 Apr 2014 00:57:57 +0200 Subject: Round one HTML external applications using QML(Qt5) WebKit2 w/o native bindings --- ethereal/ui/ui_lib.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'ethereal/ui/ui_lib.go') diff --git a/ethereal/ui/ui_lib.go b/ethereal/ui/ui_lib.go index 95743fa5d..096af16db 100644 --- a/ethereal/ui/ui_lib.go +++ b/ethereal/ui/ui_lib.go @@ -51,6 +51,22 @@ func (ui *UiLib) Open(path string) { }() } +func (ui *UiLib) OpenHtml(path string) { + component, err := ui.engine.LoadFile(ui.AssetPath("qml/webapp.qml")) + if err != nil { + ethutil.Config.Log.Debugln(err) + + return + } + win := component.CreateWindow(nil) + win.Set("url", path) + + go func() { + win.Show() + win.Wait() + }() +} + func (ui *UiLib) Connect(button qml.Object) { if !ui.connected { ui.eth.Start() -- cgit v1.2.3