aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal/ui/ui_lib.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-04-21 06:57:57 +0800
committerobscuren <geffobscura@gmail.com>2014-04-21 06:57:57 +0800
commit6d5d539a859cae43a1e97acd6fc5675d45b09063 (patch)
tree4c8e1735723a359424aecd4e4652ed1429d7d12f /ethereal/ui/ui_lib.go
parenta0c97b663dcb8de940c17479877e3165834f0c8a (diff)
downloaddexon-6d5d539a859cae43a1e97acd6fc5675d45b09063.tar
dexon-6d5d539a859cae43a1e97acd6fc5675d45b09063.tar.gz
dexon-6d5d539a859cae43a1e97acd6fc5675d45b09063.tar.bz2
dexon-6d5d539a859cae43a1e97acd6fc5675d45b09063.tar.lz
dexon-6d5d539a859cae43a1e97acd6fc5675d45b09063.tar.xz
dexon-6d5d539a859cae43a1e97acd6fc5675d45b09063.tar.zst
dexon-6d5d539a859cae43a1e97acd6fc5675d45b09063.zip
Round one HTML external applications using QML(Qt5) WebKit2 w/o native bindings
Diffstat (limited to 'ethereal/ui/ui_lib.go')
-rw-r--r--ethereal/ui/ui_lib.go16
1 files changed, 16 insertions, 0 deletions
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()