therecipe / qt

Qt binding for Go (Golang) with support for Windows / macOS / Linux / FreeBSD / Android / iOS / Sailfish OS / Raspberry Pi / AsteroidOS / Ubuntu Touch / JavaScript / WebAssembly
GNU Lesser General Public License v3.0
10.5k stars 748 forks source link

panic: interface conversion: interface {} is []interface {}, not []*gui.QScreen #1245

Open inits opened 3 years ago

inits commented 3 years ago

error message is:

QApplication: invalid style override passed, ignoring it.
    Available styles: Windows, Fusion
panic: interface conversion: interface {} is []interface {}, not []*gui.QScreen

goroutine 1 [running, locked to thread]:
github.com/therecipe/qt/gui.(*QGuiApplication).Screens(...)
    /home/inits/works/dataker/data/workspace/pkg/mod/github.com/therecipe/qt@v0.0.0-20200904063919-c0c124a5770d/gui/gui.go:9725
main.main()
    /home/inits/Desktop/test1/gtest1/hello.go:80 +0x46e

func main() {

    mainApp := widgets.NewQApplication(len(os.Args), os.Args)

    snum := mainApp.Screens()
    fmt.Println("snum is: ", snum)
}