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.38k stars 736 forks source link

string does not implement core.QBitArray_ITF (missing QBitArray_PTR method) #823

Open karalabe opened 5 years ago

karalabe commented 5 years ago

While running qtsetup against Qt 5.13.0, I've hit another compilation error:

github.com/therecipe/qt/internal/examples/qml/gallery
# github.com/therecipe/qt/internal/examples/qml/gallery
./gallery.go:25:48: cannot use style (type string) as type core.QBitArray_ITF in argument to core.NewQVariant14:
    string does not implement core.QBitArray_ITF (missing QBitArray_PTR method)
./gallery.go:27:82: cannot use "" (type string) as type core.QBitArray_ITF in argument to core.NewQVariant14:
    string does not implement core.QBitArray_ITF (missing QBitArray_PTR method)
karalabe commented 5 years ago

Can confirm that downgrading to 5.12.2 solves this issue. You'll probably need to release a fix once the final stable 5.13.0 arrives.

therecipe commented 5 years ago

Hey

Yes, there seems to be some api breakage coming with 5.13. I will update the examples once 5.13 is released, in the meantime you could use QT_API=5.12.0 to link against Qt 5.13 while using the 5.12 api used in these examples.

I also plan to create core.NewQVariant1, which will accept ...interface{} to work around this issue in the future.