Just experimented with qml. Now moving to go-qml, my go "fmt.PrintLn()" statements and my QML "console.log()" statements are only printed once I close the program. From Go:
package main
How to get these println statements show up as I run the program, live?
My windock.qml file also contains typical console.log() statements in various places that show up properly when launched from QtCreator; but once launched from go, all these statements show up all at once after I close my program. This is causing experimentation/debugging extremely difficult...
thanks for your help
Just experimented with qml. Now moving to go-qml, my go "fmt.PrintLn()" statements and my QML "console.log()" statements are only printed once I close the program. From Go: package main
import ( "fmt" "gopkg.in/qml.v1" "time" )
func main() { fmt.Println("Before QML run") qml.Run(run) fmt.Println("After QML run") time.Sleep(1e9 * 2) }
func run() error { engine := qml.NewEngine() component, err := engine.LoadFile("qml/windock.qml") if err != nil { panic(err) } window := component.CreateWindow(nil) window.Show() window.Wait() return nil }
How to get these println statements show up as I run the program, live? My windock.qml file also contains typical console.log() statements in various places that show up properly when launched from QtCreator; but once launched from go, all these statements show up all at once after I close my program. This is causing experimentation/debugging extremely difficult... thanks for your help