cutego/internal/examples/quick/calc/calc.go
2018-03-26 18:26:55 +02:00

23 lines
464 B
Go

package main
import (
"os"
"github.com/therecipe/qt/core"
"github.com/therecipe/qt/gui"
"github.com/therecipe/qt/quick"
)
func main() {
core.QCoreApplication_SetAttribute(core.Qt__AA_EnableHighDpiScaling, true)
gui.NewQGuiApplication(len(os.Args), os.Args)
var view = quick.NewQQuickView(nil)
view.SetSource(core.NewQUrl3("qrc:/qml/calc.qml", 0))
view.SetResizeMode(quick.QQuickView__SizeRootObjectToView)
view.Show()
gui.QGuiApplication_Exec()
}