mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 08:58:37 +00:00
24 lines
337 B
Go
24 lines
337 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"os"
|
||
|
|
||
|
"github.com/mappu/miqt/qt"
|
||
|
"github.com/mappu/miqt/qt/script"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
|
||
|
qt.NewQApplication(os.Args)
|
||
|
|
||
|
inputProgram := "1 + 2"
|
||
|
|
||
|
eng := script.NewQScriptEngine()
|
||
|
result := eng.Evaluate(inputProgram)
|
||
|
|
||
|
fmt.Printf("%s = %1.f\n", inputProgram, result.ToNumber())
|
||
|
|
||
|
// qt.QApplication_Exec()
|
||
|
}
|