diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-01-13 08:54:27 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-01-13 17:36:37 +0100 |
commit | 96cf8a33c3c2fa8a3e010e33c37462e3a703fe3d (patch) | |
tree | 4bccc4cbef04358828aed1090de8fc7dc3e0ca94 /src/quick/items/qquickitemsmodule.cpp | |
parent | 1f4cfccecdb423be66ac1f6eda70e87c382972f8 (diff) |
Register PointerScrollEvent and document the WheelHandler.wheel signal
Writing an onWheel() handler script was working and mentioned briefly
in docs; but PointerScrollEvent and the signal were not documented.
Also fixed the type of QtQuick::WheelEvent::inverted: bool not int.
Fixes: QTBUG-81302
Change-Id: I31342955c42e20ff52460a1b7ee95da325e38af6
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/items/qquickitemsmodule.cpp')
-rw-r--r-- | src/quick/items/qquickitemsmodule.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quick/items/qquickitemsmodule.cpp b/src/quick/items/qquickitemsmodule.cpp index 7bc6eefe0a..86253e770f 100644 --- a/src/quick/items/qquickitemsmodule.cpp +++ b/src/quick/items/qquickitemsmodule.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2019 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtQuick module of the Qt Toolkit. @@ -494,6 +494,8 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor) #endif #if QT_CONFIG(wheelevent) qmlRegisterType<QQuickWheelHandler>(uri, 2, 14, "WheelHandler"); + qmlRegisterUncreatableType<QQuickPointerScrollEvent>(uri, 2, 14, "PointerScrollEvent", + QQuickPointerHandler::tr("PointerScrollEvent is only available via the WheelHandler::wheel signal")); #endif qmlRegisterUncreatableType<QQuickImageBase, 14>(uri, 2, 14, "ImageBase", QQuickPointerHandler::tr("ImageBase is an abstract base class")); |