diff --git a/sources/ElementsCollection/elementstreeview.cpp b/sources/ElementsCollection/elementstreeview.cpp index e84b6a3ce..00f39b529 100644 --- a/sources/ElementsCollection/elementstreeview.cpp +++ b/sources/ElementsCollection/elementstreeview.cpp @@ -82,7 +82,11 @@ void ElementsTreeView::startElementDrag(const ElementsLocation &location) { if (! location.exist()) return; +#if QT_VERSION < QT_VERSION_CHECK(6, 2, 0) + QDrag* drag = new QDrag(this); +#else QScopedPointer drag(new QDrag(this)); +#endif QString location_str = location.toString(); QMimeData *mime_data = new QMimeData();