Skip to content

Instantly share code, notes, and snippets.

@imheresamir
Last active August 29, 2015 14:11
Show Gist options
  • Save imheresamir/3be081b17e0366fdab73 to your computer and use it in GitHub Desktop.
Save imheresamir/3be081b17e0366fdab73 to your computer and use it in GitHub Desktop.
package main
import (
"gopkg.in/qml.v1"
"os"
"os/exec"
//"runtime/debug"
)
func main() {
qml.Run(run)
}
func run() error {
engine := qml.NewEngine()
component, err := engine.LoadFile("test.qml")
if err != nil {
return err
}
win := component.CreateWindow(nil)
win.Show()
//debug.PrintStack()
go func() {
//cmd := exec.Command("youtube-dl", "-g", "https://www.youtube.com/watch?v=B5_2GJweQiw")
cmd := exec.Command("echo", "hello world")
cmd.Stdout = os.Stdout
cmd.Run()
}()
win.Wait()
return nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment