How to get a screenshot in Android?
-
wrote on 31 Jul 2019, 17:26 last edited by
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.
-
wrote on 31 Jul 2019, 17:29 last edited by
qDebug() <<"image.isNull() :" << image.isNull()<<"screen->size() :"<<screen->size();
return
image.isNull() : false screen->size() : QSize(360, 640) -
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.
@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?
-
wrote on 31 Jul 2019, 17:30 last edited by
Could the screen be incorrectly processed?
-
wrote on 31 Jul 2019, 17:31 last edited by
I use Qt 5.13
-
wrote on 31 Jul 2019, 17:32 last edited by
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 ?
-
wrote on 31 Jul 2019, 17:36 last edited by
I use Android 5,6,9
-
@mikeeeeee
Well if possible you can try on another android device to see if same happens. -
wrote on 31 Jul 2019, 17:56 last edited by
I use 3 android device
-
wrote on 31 Jul 2019, 17:57 last edited by
Does this code work on your phone? And if it works, what version of the code?
-
wrote on 31 Jul 2019, 18:31 last edited by
Maybe you know how use for this Android API?
-
wrote on 1 Aug 2019, 05:46 last edited by
26/29