From 12ac74522690c5c5acd4776453ae0db7c54b9598 Mon Sep 17 00:00:00 2001 From: fnRice Date: Tue, 23 Dec 2025 18:02:53 +0800 Subject: [PATCH] fix: CefBinaryValue::GetRawData does not exist under version 119 --- src/details/QCefViewPrivate.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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); }