| 243 | } |
| 244 | |
| 245 | bool ActiveToolTip::insideThis(QObject* object) |
| 246 | { |
| 247 | Q_D(ActiveToolTip); |
| 248 | |
| 249 | while (object) { |
| 250 | if (qobject_cast<QMenu*>(object)) { |
| 251 | return true; |
| 252 | } |
| 253 | |
| 254 | if (object == this || object == ( QObject* )this->windowHandle() || d->friendWidgets_.contains(object)) { |
| 255 | return true; |
| 256 | } |
| 257 | object = object->parent(); |
| 258 | } |
| 259 | |
| 260 | // If the object clicked is inside a QQuickWidget, its parent is null even |
| 261 | // if it is part of a tool-tip. This check ensures that a tool-tip is never |
| 262 | // closed while the mouse is in it |
| 263 | return underMouse(); |
| 264 | } |
| 265 | |
| 266 | void ActiveToolTip::showEvent(QShowEvent*) |
| 267 | { |