<div>Because "" is falsy and converted to Double 0.0 in JS. If you set for example "1" it probably also will work, since JS knows how to convert it to a number.</div><br><div class="gmail_quote_attribution">On Sep 17 2018, at 8:44 pm, Kálmán Viktor <viktorvector@gmail.com> wrote:</div><blockquote><br><div><div><div><div><div><div><div><div><div><div>Hello,</div><div><br></div><div>this code produces the following output</div><div><br></div><div>Python snippet</div><div>@pyqtSlot(float)</div><div><div>def xy(self, amount):</div></div><div><div>    print("am", amount)</div></div><div><br></div><div>QML snippet</div><div>print(amountInput.text, amountInput.text === "") </div><div><div>controller.xy(amountInput.text)</div></div><div><br></div><div>Output</div><div><div>qml:  true</div><div>am 0.0</div></div><div><br></div><div>Is this intentional? If I use any other string than "" I get (I think the correct) nan. I'm using PyQt5==5.11.2</div><div><br></div></div></div></div></div></div></div></div></div><div>_______________________________________________</div><div>PyQt mailing list PyQt@riverbankcomputing.com</div><div>https://www.riverbankcomputing.com/mailman/listinfo/pyqt</div></div></blockquote>