Unsolved How to get a screenshot in Android?
-
@mikeeeeee
Ok, that means its does grab something :) -
But how to get a picture out of it?
-
@mikeeeeee
Cant you just save it ?
https://doc.qt.io/qt-5/qimage.html#save -
We've made a mistake. I immediately ask the text QString image("data:image/png;base64,"); And so, pictures of the there is no. Need another code.
-
qDebug() <<"image.isNull() :" << image.isNull()<<"screen->size() :"<<screen->size();
return
image.isNull() : false screen->size() : QSize(360, 640) -
@mikeeeeee
Im really not sure what you are saying. :)
That code work for others it seemed
https://stackoverflow.com/questions/21697185/how-to-take-screenshot-of-qml-application-without-qquickview/38501975What Qt version are you using?
-
Could the screen be incorrectly processed?
-
I use Qt 5.13
-
my initial code worked in Windows, but it doesn't work in Android.
-
@mikeeeeee
Hi
Not all android devices can take shot of QML. Need support in openGL driver.Hmm. your Qt version seems new enough.
if you google "qt qml grabwindow bug" you can see there been quite some issues but
it should work with new Qt versions.How type of android device are you using ? I mena is it old or kinda new ?
-
I use Android 5,6,9
-
@mikeeeeee
Well if possible you can try on another android device to see if same happens. -
I use 3 android device
-
Does this code work on your phone? And if it works, what version of the code?
-
Maybe you know how use for this Android API?
-