diff --git a/src/details/QCefViewPrivate.cpp b/src/details/QCefViewPrivate.cpp index cdc8f7fd..2b538e0d 100644 --- a/src/details/QCefViewPrivate.cpp +++ b/src/details/QCefViewPrivate.cpp @@ -633,7 +633,13 @@ QCefViewPrivate::onStartDragging(CefRefPtr& dragData, CefRenderHand int h = 0; if (auto pngData = image->GetAsPNG(1.0, true, w, h)) { QPixmap pixmap; +#if CEF_VERSION_MAJOR >= 119 pixmap.loadFromData((const uchar*)(pngData->GetRawData()), (int)(pngData->GetSize())); +#else + std::vector buffer(pngData->GetSize()); + pngData->GetData(buffer.data(), buffer.size(), 0); + pixmap.loadFromData(buffer.data(), static_cast(buffer.size())); +#endif pixmap.setDevicePixelRatio(scaleFactor()); drag.setPixmap(pixmap); }