How to get a screenshot in Android?
-
@mrjj said in How to get a screenshot in Android?:
qDebug() << image.isNull();
qDebug() <<"image.isNull() :" << image.isNull();
return:
image.isNull() : false@mikeeeeee
Ok, that means its does grab something :) -
@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.
@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?
-
@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 ?
-
@mikeeeeee
Well if possible you can try on another android device to see if same happens. -