diff --git a/libshvvisu/src/timeline/graphwidget.cpp b/libshvvisu/src/timeline/graphwidget.cpp index 9de126fe7..de98929b1 100644 --- a/libshvvisu/src/timeline/graphwidget.cpp +++ b/libshvvisu/src/timeline/graphwidget.cpp @@ -439,7 +439,11 @@ void GraphWidget::mouseMoveEvent(QMouseEvent *event) mime->setText(QString()); drag->setMimeData(mime); QPoint p = mapToGlobal(header_rect.topLeft()); - drag->setPixmap(screen()->grabWindow(winId(), p.x(), p.y(), header_rect.width(), header_rect.height())); +#if QT_VERSION_MAJOR < 6 + drag->setPixmap(screen()->grabWindow(QDeskopWidget().winId(), p.x(), p.y(), header_rect.width(), header_rect.height())); +#else + drag->setPixmap(screen()->grabWindow(0, p.x(), p.y(), header_rect.width(), header_rect.height())); +#endif drag->setHotSpot(mapToGlobal(pos) - p); setAcceptDrops(true);