diff --git a/frame/item/components/appsnapshot.cpp b/frame/item/components/appsnapshot.cpp index 85d5faee1..769c485f0 100644 --- a/frame/item/components/appsnapshot.cpp +++ b/frame/item/components/appsnapshot.cpp @@ -226,7 +226,7 @@ void AppSnapshot::fetchSnapshot() emit requestCheckWindow(); return; } - qimage = QImage((const uchar *)(ximage->data), ximage->width, ximage->height, ximage->bytes_per_line, QImage::Format_RGB32); + qimage = QImage(reinterpret_cast(ximage->data), ximage->width, ximage->height, ximage->bytes_per_line, QImage::Format_RGB32).copy(); } Q_ASSERT(!qimage.isNull());