0

i need to create a ComponentC dynamically when a button of ComponentA is clicked and the ComponentC must be created in ComponentB that is not accessible through id from ComponentA.

So how is this realisable with QML ?

Thanks.

Slim
  • 306
  • 3
  • 11

1 Answers1

0

A signal can return an object returned by the called slot:

int B::slot() {
  return 12;
}

void A::test() {
  connect( this, SIGNAL(sig()), objectB, SLOT(slot());
  int i = emit sig(); // i should be equal to 12
}

But, I don't know if it's an expected behavior...

Dimitry Ernot
  • 6,256
  • 2
  • 25
  • 37