QObject::findChildren<>() problem
-
Hi all !
My class derived as QQmlPropertyMap<-MyClass1<-MayClass2.
When try in parent function;
findChildren<MyClass2*>(); // returns empty list
findChildren<MyClass1*>(); // returns empty list
findChildren<QQmlPropertyMap*>(); // returns list of created QQmlPropertyMap objects of parent.Any suggestions ?
Thanks...
-
@eyllanesc said in QObject::findChildren<>() problem:
please provide a verifiable example
thank you your reply but codes of classes very long... but I can say all classes has Q_OBJECT, registered by Q_DECLARE_METATYPE and qRegisterMetaType.
-
@VeNToR said in QObject::findChildren<>() problem:
but codes of classes very long...
Then remove everything unneded then your code is imo not longer than 20 lines. 2 classes simply derived from QQmlPropertyMap / MyClass1, one main function which instantiates those classes and does a findChildren<>.