From 0e9581efb4ece8f8a5edf8e2c08b91f8f4d2dc14 Mon Sep 17 00:00:00 2001 From: Leonardo Zide Date: Sat, 12 Dec 2020 16:07:56 -0800 Subject: [PATCH] Compile fix. --- qt/lc_qpropertiestree.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qt/lc_qpropertiestree.cpp b/qt/lc_qpropertiestree.cpp index 746f839e..cbf485d4 100644 --- a/qt/lc_qpropertiestree.cpp +++ b/qt/lc_qpropertiestree.cpp @@ -798,8 +798,12 @@ void lcQPropertiesTree::slotColorButtonClicked() connect(Popup, SIGNAL(selected(int)), SLOT(slotSetValue(int))); Popup->setMinimumSize(300, 200); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) QScreen* Screen = QGuiApplication::screenAt(Button->mapToGlobal(Button->rect().bottomLeft())); const QRect ScreenRect = Screen ? Screen->geometry() : QApplication::desktop()->geometry(); +#else + const QRect ScreenRect = QApplication::desktop()->geometry(); +#endif QPoint pos = Button->mapToGlobal(Button->rect().bottomLeft()); if (pos.x() < ScreenRect.left())