X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fwidgets%2Fpopup.cpp;fp=pv%2Fwidgets%2Fpopup.cpp;h=9614701b7a9701d9c9cb2d2d277dfb388b4295ab;hp=ec6d29c981c235b86451353ca620d9c5cf147868;hb=ffad6cd6856a0e0de36cad164d9d09e06c0ec52a;hpb=153225bc3339c2ee9a861a32cba2a15f2ddddd1f diff --git a/pv/widgets/popup.cpp b/pv/widgets/popup.cpp index ec6d29c9..9614701b 100644 --- a/pv/widgets/popup.cpp +++ b/pv/widgets/popup.cpp @@ -252,8 +252,12 @@ void Popup::reposition_widget() { QPoint o; +#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) + const QRect screen_rect = QApplication::screenAt(point_)->availableGeometry(); +#else const QRect screen_rect = QApplication::desktop()->availableGeometry( QApplication::desktop()->screenNumber(point_)); +#endif if (pos_ == Right || pos_ == Left) o.ry() = -height() / 2;