diff options
-rw-r--r-- | src/imports/controls/doc/src/includes/qquickoverlay-popup-parent.qdocinc | 4 | ||||
-rw-r--r-- | src/imports/controls/plugins.qmltypes | 12 | ||||
-rw-r--r-- | src/imports/templates/plugins.qmltypes | 10 | ||||
-rw-r--r-- | src/imports/templates/qtquicktemplates2plugin.cpp | 1 | ||||
-rw-r--r-- | src/quicktemplates2/qquickrangeslider.cpp | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquickslider.cpp | 3 | ||||
-rw-r--r-- | src/quicktemplates2/qquicktextarea.cpp | 5 | ||||
-rw-r--r-- | tests/auto/controls/data/tst_textarea.qml | 3 |
8 files changed, 35 insertions, 5 deletions
diff --git a/src/imports/controls/doc/src/includes/qquickoverlay-popup-parent.qdocinc b/src/imports/controls/doc/src/includes/qquickoverlay-popup-parent.qdocinc index 7ad8a003..5562f6a0 100644 --- a/src/imports/controls/doc/src/includes/qquickoverlay-popup-parent.qdocinc +++ b/src/imports/controls/doc/src/includes/qquickoverlay-popup-parent.qdocinc @@ -11,8 +11,8 @@ Button { parent: Overlay.overlay - x: (parent.width - width) / 2 - y: (parent.height - height) / 2 + x: Math.round((parent.width - width) / 2) + y: Math.round((parent.height - height) / 2) width: 100 height: 100 } diff --git a/src/imports/controls/plugins.qmltypes b/src/imports/controls/plugins.qmltypes index 8b2be4a1..5011365c 100644 --- a/src/imports/controls/plugins.qmltypes +++ b/src/imports/controls/plugins.qmltypes @@ -1208,6 +1208,16 @@ Module { Property { name: "title"; type: "string" } Property { name: "label"; type: "QQuickItem"; isPointer: true } } + + Component { + name: "QQuickIcon" + Property { name: "name"; type: "string" } + Property { name: "source"; type: "QUrl" } + Property { name: "width"; type: "int" } + Property { name: "height"; type: "int" } + Property { name: "color"; type: "QColor" } + } + Component { name: "QQuickItemDelegate" defaultProperty: "data" @@ -1903,7 +1913,7 @@ Module { Property { name: "busy"; type: "bool"; isReadonly: true } Property { name: "depth"; type: "int"; isReadonly: true } Property { name: "currentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true } - Property { name: "initialItem"; type: "QVariant" } + Property { name: "initialItem"; type: "QJSValue" } Property { name: "popEnter"; type: "QQuickTransition"; isPointer: true } Property { name: "popExit"; type: "QQuickTransition"; isPointer: true } Property { name: "pushEnter"; type: "QQuickTransition"; isPointer: true } diff --git a/src/imports/templates/plugins.qmltypes b/src/imports/templates/plugins.qmltypes index ed609c1f..0283f50d 100644 --- a/src/imports/templates/plugins.qmltypes +++ b/src/imports/templates/plugins.qmltypes @@ -567,6 +567,14 @@ Module { Property { name: "label"; type: "QQuickItem"; isPointer: true } } Component { + name: "QQuickIcon" + Property { name: "name"; type: "string" } + Property { name: "source"; type: "QUrl" } + Property { name: "width"; type: "int" } + Property { name: "height"; type: "int" } + Property { name: "color"; type: "QColor" } + } + Component { name: "QQuickItemDelegate" defaultProperty: "data" prototype: "QQuickAbstractButton" @@ -1261,7 +1269,7 @@ Module { Property { name: "busy"; type: "bool"; isReadonly: true } Property { name: "depth"; type: "int"; isReadonly: true } Property { name: "currentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true } - Property { name: "initialItem"; type: "QVariant" } + Property { name: "initialItem"; type: "QJSValue" } Property { name: "popEnter"; type: "QQuickTransition"; isPointer: true } Property { name: "popExit"; type: "QQuickTransition"; isPointer: true } Property { name: "pushEnter"; type: "QQuickTransition"; isPointer: true } diff --git a/src/imports/templates/qtquicktemplates2plugin.cpp b/src/imports/templates/qtquicktemplates2plugin.cpp index 81330447..ace2b316 100644 --- a/src/imports/templates/qtquicktemplates2plugin.cpp +++ b/src/imports/templates/qtquicktemplates2plugin.cpp @@ -299,6 +299,7 @@ void QtQuickTemplates2Plugin::registerTypes(const char *uri) qmlRegisterType<QQuickContainer, 3>(uri, 2, 3, "Container"); qmlRegisterType<QQuickDialog, 3>(uri, 2, 3, "Dialog"); qmlRegisterType<QQuickDialogButtonBox, 3>(uri, 2, 3, "DialogButtonBox"); + qmlRegisterType<QQuickIcon>(); qRegisterMetaType<QQuickIcon>(); qmlRegisterType<QQuickLabel, 3>(uri, 2, 3, "Label"); qmlRegisterType<QQuickMenu, 3>(uri, 2, 3, "Menu"); diff --git a/src/quicktemplates2/qquickrangeslider.cpp b/src/quicktemplates2/qquickrangeslider.cpp index 5b282f2c..49384fe4 100644 --- a/src/quicktemplates2/qquickrangeslider.cpp +++ b/src/quicktemplates2/qquickrangeslider.cpp @@ -86,6 +86,8 @@ QT_BEGIN_NAMESPACE RangeSlider. In the example above, \l {first.visualPosition} will be \c 0.24 in a left-to-right application, and \c 0.76 in a right-to-left application. + For a slider that allows the user to select a single value, see \l Slider. + \sa {Customizing RangeSlider}, {Input Controls}, {Focus Management in Qt Quick Controls 2} */ diff --git a/src/quicktemplates2/qquickslider.cpp b/src/quicktemplates2/qquickslider.cpp index 86e2445a..60667267 100644 --- a/src/quicktemplates2/qquickslider.cpp +++ b/src/quicktemplates2/qquickslider.cpp @@ -73,6 +73,9 @@ QT_BEGIN_NAMESPACE In the example above, \l visualPosition will be \c 0.24 in a left-to-right application, and \c 0.76 in a right-to-left application. + For a slider that allows the user to select a range by providing two + handles, see \l RangeSlider. + \sa {Customizing Slider}, {Input Controls} */ diff --git a/src/quicktemplates2/qquicktextarea.cpp b/src/quicktemplates2/qquicktextarea.cpp index a13213fd..45a084d2 100644 --- a/src/quicktemplates2/qquicktextarea.cpp +++ b/src/quicktemplates2/qquicktextarea.cpp @@ -529,7 +529,10 @@ void QQuickTextArea::setBackground(QQuickItem *background) delete d->background; d->background = background; if (background) { - background->setParentItem(this); + if (d->flickable) + background->setParentItem(d->flickable); + else + background->setParentItem(this); if (qFuzzyIsNull(background->z())) background->setZ(-1); if (isComponentComplete()) diff --git a/tests/auto/controls/data/tst_textarea.qml b/tests/auto/controls/data/tst_textarea.qml index ea30c8d6..38e810f7 100644 --- a/tests/auto/controls/data/tst_textarea.qml +++ b/tests/auto/controls/data/tst_textarea.qml @@ -212,6 +212,9 @@ TestCase { var textArea = control.TextArea.flickable verify(textArea) + if (textArea.background) + compare(textArea.background.parent, control) + for (var i = 1; i <= 100; ++i) textArea.text += "line\n" + i |