X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fwidgets%2Fpopup.cpp;h=13282cda25e458b6b624de563f09e1fc6668a6b5;hb=HEAD;hp=ec6d29c981c235b86451353ca620d9c5cf147868;hpb=f52ffd9d82b45313836c5e612c7cc48982ced529;p=pulseview.git diff --git a/pv/widgets/popup.cpp b/pv/widgets/popup.cpp index ec6d29c9..bcfd8753 100644 --- a/pv/widgets/popup.cpp +++ b/pv/widgets/popup.cpp @@ -21,7 +21,11 @@ #include #include +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +#include +#else #include +#endif #include #include #include @@ -252,8 +256,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;