Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
6d5d539a
Commit
6d5d539a
authored
Apr 20, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Round one HTML external applications using QML(Qt5) WebKit2 w/o native bindings
parent
a0c97b66
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
wallet.qml
ethereal/assets/qml/wallet.qml
+6
-1
ui_lib.go
ethereal/ui/ui_lib.go
+16
-0
No files found.
ethereal/assets/qml/wallet.qml
View file @
6d5d539a
...
@@ -18,11 +18,13 @@ ApplicationWindow {
...
@@ -18,11 +18,13 @@ ApplicationWindow {
MenuBar
{
MenuBar
{
Menu
{
Menu
{
title
:
"File"
title
:
"File"
/*
MenuItem {
MenuItem {
text: "Import App"
text: "Import App"
shortcut: "Ctrl+o"
shortcut: "Ctrl+o"
onTriggered: openAppDialog.open()
onTriggered: openAppDialog.open()
}
}
*/
}
}
Menu
{
Menu
{
...
@@ -240,7 +242,10 @@ ApplicationWindow {
...
@@ -240,7 +242,10 @@ ApplicationWindow {
id
:
openAppDialog
id
:
openAppDialog
title
:
"Open QML Application"
title
:
"Open QML Application"
onAccepted
:
{
onAccepted
:
{
ui
.
open
(
openAppDialog
.
fileUrl
.
toString
())
//ui.open(openAppDialog.fileUrl.toString())
//ui.openHtml(Qt.resolvedUrl(ui.assetPath("test.html")))
ui
.
openHtml
(
openAppDialog
.
fileUrl
.
toString
())
}
}
}
}
...
...
ethereal/ui/ui_lib.go
View file @
6d5d539a
...
@@ -51,6 +51,22 @@ func (ui *UiLib) Open(path string) {
...
@@ -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
)
{
func
(
ui
*
UiLib
)
Connect
(
button
qml
.
Object
)
{
if
!
ui
.
connected
{
if
!
ui
.
connected
{
ui
.
eth
.
Start
()
ui
.
eth
.
Start
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment