https://bugs.kde.org/show_bug.cgi?id=421159

--- Comment #11 from Albert Astals Cid <aa...@kde.org> ---
This makes the pageview scroll

void PartTest::testWheelInPageView()
{
    QVariantList dummyArgs;
    Okular::Part part(nullptr, nullptr, dummyArgs);
    QVERIFY(openDocument(&part, QStringLiteral(KDESRCDIR "data/file2.pdf")));
    part.widget()->resize(600, 400);
    part.widget()->show();
    QVERIFY(QTest::qWaitForWindowExposed(part.widget()));
    QTest::qWait(3000);
    auto we = new QWheelEvent({}, {}, {}, {0, -150}, Qt::NoButton,
Qt::NoModifier, Qt::NoScrollPhase, false);
    QCoreApplication::postEvent(part.m_pageView->viewport(), we);
    QTest::qWait(3000);
}



The QWheelEvent definition is a bit "bogus" in which it doesn't define pos nor
globalPos, just abuses the knowledge that PageView::wheelEvent just uses the
angleDelta().y()

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to