<div dir="ltr">Oh god, looks like I replied just to a single participant. Here's what I posted yesterday.<div><br></div><div><div>> (bleh, seems like your mail client messed this up...)</div><div><br></div><div>Sorry about that. Could you post a screengrab of what it looks like? Haven't had this issue before, here it looks ok. (I'm on Gmail)</div><div><br></div><div>> You can pass a C++ type as a string to pyqtSlot, i.e.:</div><div><br></div><div>That does indeed work for passing a list from QML like I was looking for. It doesn't quite work as I hoped however.</div><div><br></div><div>Basically this from QML:</div><div><br></div><div>log.debug("Hello", "World")</div><div><br></div><div>Should get to Python like this.</div><div><br></div><div>@QtCore.pyqtSlot("QStringList")</div><div>def debug(*args):</div><div> log.debug(" ".join(args))</div><div><br></div><div>I'd like to support an arbitrary amount of arguments to my Python debug method. Does that make sense?</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 25 November 2014 at 10:29, Florian Bruhin <span dir="ltr"><<a href="mailto:me@the-compiler.org" target="_blank">me@the-compiler.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">* Marcus Ottosson <<a href="mailto:konstruktion@gmail.com">konstruktion@gmail.com</a>> [2014-11-25 09:59:21 +0000]:<br>
<span class="">> Ah, I see. I was trying to use it in a pyqtSlot.<br>
><br>
> Could you have a look at the below example and see I’m thinking about this<br>
> the right way?<br>
><br>
> @QtCore.pyqtSlot(QtCore.QStringList)def warning(self, *msg):<br>
> self.log.warning(" ".join(msg))<br>
<br>
</span>(bleh, seems like your mail client messed this up...)<br>
<br>
You can pass a C++ type as a string to pyqtSlot, i.e.:<br>
<br>
@QtCore.pyqtSlot('QStringList')<br>
<br>
should probably work.<br>
<span class="HOEnZb"><font color="#888888"><br>
Florian<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
--<br>
<a href="http://www.the-compiler.org" target="_blank">http://www.the-compiler.org</a> | <a href="mailto:me@the-compiler.org">me@the-compiler.org</a> (Mail/XMPP)<br>
GPG 0xFD55A072 | <a href="http://the-compiler.org/pubkey.asc" target="_blank">http://the-compiler.org/pubkey.asc</a><br>
I love long mails! | <a href="http://email.is-not-s.ms/" target="_blank">http://email.is-not-s.ms/</a><br>
</div></div><br>_______________________________________________<br>
PyQt mailing list <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><font size="1"><b>Marcus Ottosson</b><br><a href="mailto:konstruktion@gmail.com" target="_blank">konstruktion@gmail.com</a></font><font size="1"><br></font></div></div>
</div>