Changeset View
Changeset View
Standalone View
Standalone View
tabbox/tabboxhandler.cpp
Show First 20 Lines • Show All 522 Lines • ▼ Show 20 Line(s) | 522 | { | |||
---|---|---|---|---|---|
523 | return d->index; | 523 | return d->index; | ||
524 | } | 524 | } | ||
525 | 525 | | |||
526 | void TabBoxHandler::grabbedKeyEvent(QKeyEvent* event) const | 526 | void TabBoxHandler::grabbedKeyEvent(QKeyEvent* event) const | ||
527 | { | 527 | { | ||
528 | if (!d->m_mainItem || !d->window()) { | 528 | if (!d->m_mainItem || !d->window()) { | ||
529 | return; | 529 | return; | ||
530 | } | 530 | } | ||
531 | const QList<QQuickItem*> items = d->window()->contentItem()->findChildren<QQuickItem*>(QString(), Qt::FindDirectChildrenOnly); | 531 | QCoreApplication::sendEvent(d->window(), event); | ||
532 | for (QQuickItem *item : items) { | | |||
533 | d->window()->sendEvent(item, event); | | |||
534 | if (event->isAccepted()) { | | |||
535 | break; | | |||
536 | } | | |||
537 | } | | |||
538 | } | 532 | } | ||
539 | 533 | | |||
540 | bool TabBoxHandler::containsPos(const QPoint& pos) const | 534 | bool TabBoxHandler::containsPos(const QPoint& pos) const | ||
541 | { | 535 | { | ||
542 | if (!d->m_mainItem) { | 536 | if (!d->m_mainItem) { | ||
543 | return false; | 537 | return false; | ||
544 | } | 538 | } | ||
545 | QWindow *w = d->window(); | 539 | QWindow *w = d->window(); | ||
▲ Show 20 Lines • Show All 113 Lines • Show Last 20 Lines |