aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/obscuren/qml/examples/controls/tableview/tableview.go
diff options
context:
space:
mode:
Diffstat (limited to 'Godeps/_workspace/src/github.com/obscuren/qml/examples/controls/tableview/tableview.go')
-rw-r--r--Godeps/_workspace/src/github.com/obscuren/qml/examples/controls/tableview/tableview.go29
1 files changed, 29 insertions, 0 deletions
diff --git a/Godeps/_workspace/src/github.com/obscuren/qml/examples/controls/tableview/tableview.go b/Godeps/_workspace/src/github.com/obscuren/qml/examples/controls/tableview/tableview.go
new file mode 100644
index 000000000..a16b6b1ab
--- /dev/null
+++ b/Godeps/_workspace/src/github.com/obscuren/qml/examples/controls/tableview/tableview.go
@@ -0,0 +1,29 @@
+package main
+
+import (
+ "fmt"
+ "gopkg.in/qml.v1"
+ "os"
+)
+
+func main() {
+ if err := qml.Run(run); err != nil {
+ fmt.Fprintf(os.Stderr, "error: %v\n", err)
+ os.Exit(1)
+ }
+}
+
+func run() error {
+ engine := qml.NewEngine()
+
+ controls, err := engine.LoadFile("main.qml")
+ if err != nil {
+ return err
+ }
+
+ window := controls.CreateWindow(nil)
+
+ window.Show()
+ window.Wait()
+ return nil
+}