Skip to content

Instantly share code, notes, and snippets.

@sshikaree
Last active August 29, 2015 13:57
Show Gist options
  • Save sshikaree/536cb210c4be4aceead4 to your computer and use it in GitHub Desktop.
Save sshikaree/536cb210c4be4aceead4 to your computer and use it in GitHub Desktop.
package main
import (
"gopkg.in/v0/qml"
)
func main() {
qml.Init(nil)
engine := qml.NewEngine()
component, err := engine.LoadFile("example.qml")
if err != nil {
panic(err)
}
window := component.CreateWindow(nil)
window.Show()
window.Wait()
}
import QtQuick 2.2
import QtQuick.Controls 1.1
ApplicationWindow {
id: rootwindow
title: "Test"
width: 800
height: 600
menuBar: MenuBar {
Menu {
title: "File"
}
Menu {
title: "Edit"
}
}
toolBar: ToolBar {
Row {
anchors.fill: parent
ToolButton {
iconName: "edit-copy"
}
ToolButton {
iconName: "edit-cut"
}
ToolButton {
iconName: "edit-paste"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment