Hello again

Consider the following:
Qt Code:
  1. Loader {
  2. anchors.fill: parent
  3. source: {
  4. switch(typeRole)
  5. {
  6. case 0: {
  7. console.log("Loaded text");
  8. return "TextItem.qml";
  9. }
  10. case 1:{
  11. console.log("Loaded image");
  12. return "ImageItem.qml";
  13. }
  14. case 2:{
  15. console.log("Loaded video");
  16. return "VideoItem.qml";
  17. }
  18. }
  19. }
  20. }
To copy to clipboard, switch view to plain text mode 

This loader, inside a delegate, creates an item depending on the role "typeRole" (which is a role declared in c++, returning an int), and like this I can create dynamic components in a model.

Now, I'm thinking about doing the same for animations. I want to create for example:
Qt Code:
  1. OpacityAnimator on opacity{
  2. id: opacityAnimation
  3. duration: 2500
  4. running: true
  5. }
To copy to clipboard, switch view to plain text mode 

But I want different animations (like XAnimator, YAnimator) without instantiating them in the Loader. Ideally would be a loader inside the previous loader, adding an animation, and switching it with a role, for example, "animationTypeRole".

Is this possible?
Because I have a LOT of possible animations to do, and this would be a BIG BIG list down the same qml document, thus making the dynamically loaded component not good, performance wise, because I would have to create so many animations for every component in the model.

Thank you