Hello!
I have used Qt 4.8.4 and have had C++ component which have been derived from QDeclarativeItem with my method “void paint(QPainter *p, const QStyleOptionGraphicsItem *s, QWidget *w);”
I moved my project to Qt 5 and there was a lot of lags and I tried to use new QML item “Canvas” with “renderStrategy: Canvas.Threaded”/ It works really good for me but now I have problem…
I have a lot of C++ code which manipulate with pixels of my “old item” and i don’t want to move it in QML.
How can I get Image in C++ from QML Canvas element?
I have tried to send “CanvasImageData” and “CanvasImageData.data” elements from my canvas’s context (canvas.context.getImageData) but it was failed ((
Please, help me
PS. I really need to get image data in C++ code. Don’t advise me to move my C++ code to QML.
↧