aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcomponent_p.h
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2018-05-09 17:16:59 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2018-08-17 13:17:28 +0000
commit607ced5bfd1390de4342bb44ab99e7acafd9f4e9 (patch)
tree97f7accdc0b1c439e699231aa71375213bf16f75 /src/qml/qml/qqmlcomponent_p.h
parent36c6b727c5f433ce3f22e18d93e2502df1c526aa (diff)
Allow DelegateModel-based views to support multiple delegate types
This patch adds a specific abstract QQmlComponent subclass, QQmlAbstractDelegateComponent, and a default implementation, DelegateChooser, that, together with the type DelegateChoice allows determining the delegate type by role and/or index. The patch also adds QQmlAbstractDelegateComponent support to QQmlTableInstanceModel, that is a simplified version of the delegate model, currently only used in the new table view. DelegateChoosers are intended to behave just like Components in the context of the view. This means that they can be declared outside of the view, and also in separate files, and the same delegate component can be used at the same time in multiple views. [ChangeLog][QtQuick][Item Views] Added a DelegateChooser Component to host DelegateChoice instances to choose different delegates in an Item View (e.g. TableView) depending on model roles. Done-with: Michael Brasser <michael.brasser@live.com> Task-number: QTBUG-26681 Change-Id: Ibe24a31daf9142c8a9ff45ef6c65da0aec8a14dc Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlcomponent_p.h')
-rw-r--r--src/qml/qml/qqmlcomponent_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlcomponent_p.h b/src/qml/qml/qqmlcomponent_p.h
index 9b2db4bccf..4d9e4c6c15 100644
--- a/src/qml/qml/qqmlcomponent_p.h
+++ b/src/qml/qml/qqmlcomponent_p.h
@@ -88,7 +88,7 @@ public:
void initializeObjectWithInitialProperties(QV4::QmlContext *qmlContext, const QV4::Value &valuemap, QObject *toCreate);
static void setInitialProperties(QV4::ExecutionEngine *engine, QV4::QmlContext *qmlContext, const QV4::Value &o, const QV4::Value &v);
- void incubateObject(
+ virtual void incubateObject(
QQmlIncubator *incubationTask,
QQmlComponent *component,
QQmlEngine *engine,