> -----Original Message----- > From: Interest <interest-bounces+mitch.curtis=qt...@qt-project.org> On > Behalf Of Alexander Ivash > Sent: Wednesday, 12 September 2018 6:02 PM > To: interest@qt-project.org > Subject: [Interest] Is it possible to define and inherit component in the same > QML file? > > Like this: > > property Component baseDelegate: Item { > } > > property Component textDelegate: baseDelegate { } > > property Component imageDelegate: baseDelegate { } ..... > > Currently it doesn't work, but maybe there are some tricks to achieve > behaviour like this without moving baseDelegate to 'BaseDelegate.qml'. > And yes, I'm aware of composition, but the question is about inheritance.
I don't think there's any way to do that without creating a separate file for it first. > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest