Changeset View
Changeset View
Standalone View
Standalone View
smb4k/smb4ktooltip.cpp
Show First 20 Lines • Show All 236 Lines • ▼ Show 20 Line(s) | 123 | { | |||
---|---|---|---|---|---|
237 | } | 237 | } | ||
238 | } | 238 | } | ||
239 | } | 239 | } | ||
240 | 240 | | |||
241 | 241 | | |||
242 | void Smb4KToolTip::show(const QPoint &pos) | 242 | void Smb4KToolTip::show(const QPoint &pos) | ||
243 | { | 243 | { | ||
244 | // Get the geometry of the screen where the cursor is | 244 | // Get the geometry of the screen where the cursor is | ||
245 | #if QT_VERSION < QT_VERSION_CHECK(5, 10, 0) | ||||
246 | const QRect screenRect = QApplication::desktop()->screenGeometry(pos); | ||||
247 | #else | ||||
245 | const QRect screenRect = QApplication::screenAt(pos)->geometry(); | 248 | const QRect screenRect = QApplication::screenAt(pos)->geometry(); | ||
249 | #endif | ||||
246 | 250 | | |||
247 | // Adjust the size | 251 | // Adjust the size | ||
248 | adjustSize(); | 252 | adjustSize(); | ||
249 | 253 | | |||
250 | // The position where the tooltip is to be shown | 254 | // The position where the tooltip is to be shown | ||
251 | QPoint tooltipPos; | 255 | QPoint tooltipPos; | ||
252 | 256 | | |||
253 | // Correct the position of the tooltip, so that it is completely | 257 | // Correct the position of the tooltip, so that it is completely | ||
▲ Show 20 Lines • Show All 609 Lines • Show Last 20 Lines |