On Mon, Jun 25, 2012 at 5:32 AM, Eric Mesa <span dir="ltr"><<a href="mailto:ericsbinaryworld@gmail.com" target="_blank">ericsbinaryworld@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><div class="gmail_quote"><br></div></div>print connect(view.rootObject(),SIGNAL(mySignal(QString)), receiver, SLOT(QUrl('message.qml')))<br></blockquote><div><br></div><div>You don't need this line because you've already connected QML's messageRequired</div>
<div>signal to Now's appropriate slot. So just remove this line and everything else looks fine.</div><div><br></div><div>In future if you're supposed to use this kind of a thing, the above line would be correct</div>
<div>as follows wrt current example:</div><div><br></div><div>QObject.connect(rootObject, SIGNAL('messageRequired()'), now, SLOT('emit_now()'))</div><div><br></div><div>(where rootObject = view.rootObject() of course)</div>
<div><br></div><div>Also, the following two lines are equivalent:</div><div><br></div><div>1. sender.signal.connect(receiver.slot)</div><div><br></div><div>2. QObject.connect(sender, SIGNAL('signal()'), receiver, SLOT('slot()'))</div>
<div><br></div><div>In the 2nd line, the parameter types should be specified in signal(...) and slot(...) as in</div><div>C++ (if any)</div><div><br></div><div>Cheers,</div><div>Viranch</div></div>