go-qml / qml

QML support for the Go language
Other
1.96k stars 187 forks source link

Loading QPixmap as images? #4

Closed raichu closed 10 years ago

raichu commented 10 years ago

This is more like a question: Is it possible to load a QPixmap (using loadFromData) from Go side as an image yo be used as an Image in QML? I believe with C++ one needs to use QDeclarativeImageProvider (at least with Qt 4, not sure about Qt 5.1+).

An example image viewer using this package would be immensely helpful :)

niemeyer commented 10 years ago

That's a nice idea, thanks. We've already got the magic for moving images from Qt to Go, so moving in the other direction won't be difficult.

I'll try to have a look at the details this week. Will keep this issue open to track the support for doing this.

raichu commented 10 years ago

Have I mentioned that you rock? :)

ghost commented 10 years ago

In Qt 5.1 the class is called QQuickImageProvider.

niemeyer commented 10 years ago

@arbaal That may well be a good path for the bridge, via a custom image provider.

raichu commented 10 years ago

Friendly ping :)

niemeyer commented 10 years ago

Thanks for the poke. I wanted to sort out the static vs. dynamic situation before diving into such bridges, and this is now done. I'll have a look at this.

niemeyer commented 10 years ago

Sorry, but I actually won't be able to look at this until next week when I'm back from a few days off.

raichu commented 10 years ago

Still sounds great :) Thanks!

raichu commented 10 years ago

Any updates?

niemeyer commented 10 years ago

I'm just back from a long work trip. My plan is to get something done before the end of the week.

Sorry for the delay on this.

raichu commented 10 years ago

Thanks!

Sorry about multiple pings :)

niemeyer commented 10 years ago

This is in progress.

raichu commented 10 years ago

Thanks!