[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] Conversion from QML
From:       "B. B." <thebbzoo () gmail ! com>
Date:       2014-12-29 21:14:24
Message-ID: CAG_54VBTgiSuh8tyeeYqW7GNnvBK=91gHj=6scQSyqRhD5Ty9Q () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello Phil,

I just updated, to the newest versions available.

Qt :
 5.3 -> 5.4

PyQt :
PyQt-gpl-5.4-snapshot-15b37c22d541  ( from around 17 of november ) ->
PyQt-gpl-5.4

Sip:
sip-4.16.5-snapshot-c005a6d2e53e ( around 17 of november ) ->
sip-4.16.6-snapshot-0e9e078d2d18


In python, I have access to a PyQt5.QtQuick.QQuickItem, got from qml
through a slot.

On the QQuickItem object, I call javascript functions, definded in qml, for
example like thisone:

qml:
--------------------
1
Item {

        function thisone( ) {
            return { prefix : "goods" , items : [ idOfItemX, idOfItemY ] }
        }

}
---------------------

I mean, I call in python, on the python QQuickItem. like :
myResult = myPythonQQuickItem.thisone().

In the earlier version, the myResult was a python dict, and myResult[
"items" ] was a python list
containing PyQt5.QtQuick.QQuickItem objects

In the newes version, I only get a myResult is a PyQt5.QtQml.QJSValue, and
one have to do the "marchalling" oneself.


Is this "lack of automatic marchalling to obvious python types" a change
that is going to stay, or is it just an regression in the newest sources
????


using python3.4, the "problem" verified on linux and Mac...


Best regards

Brian

[Attachment #5 (text/html)]

<div dir="ltr">Hello Phil, <br><br>I just updated, to the newest versions available. \
<br><br>Qt :<br>  5.3 -&gt; 5.4<br><br>PyQt : <br>PyQt-gpl-5.4-snapshot-15b37c22d541  \
( from around 17 of november ) -&gt; PyQt-gpl-5.4<br><br>Sip:   \
<br>sip-4.16.5-snapshot-c005a6d2e53e ( around 17 of november ) -&gt; \
sip-4.16.6-snapshot-0e9e078d2d18 <br><br><br>In python, I have access to a \
PyQt5.QtQuick.QQuickItem, got from qml through a slot. <br><br>On the QQuickItem \
object, I call javascript functions, definded in qml, for example like \
thisone:<br><br>qml:<br>--------------------<br>1<br>Item {<br><br>               \
function thisone( ) {<br>                       return { prefix : &quot;goods&quot; , \
items : [ idOfItemX, idOfItemY ] }<br>               \
}<br><br>}<br>---------------------<br><br>I mean, I call in python, on the python \
QQuickItem. like : <br>myResult = myPythonQQuickItem.thisone().<br><br>In the earlier \
version, the myResult was a python dict, and myResult[ &quot;items&quot; ] was a \
python list<br>containing PyQt5.QtQuick.QQuickItem objects<br><br>In the newes \
version, I only get a myResult is a PyQt5.QtQml.QJSValue, and one have to do the \
&quot;marchalling&quot; oneself. <br><br><br>Is this &quot;lack of automatic \
marchalling to obvious python types&quot; a change that is going to stay, or is it \
just an regression in the newest sources ????<br><br><br>using python3.4, the \
&quot;problem&quot; verified on linux and Mac...<br><br><br>Best regards<br><br>Brian \
<br><br><br><br><br><br><br>  <br><br><br><br></div>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic