QML slot value not access out side function



  • hi , please help me i receive a slot (function) in qml file when but function value cant access out side function as playerTurnName is class variable
    but it return empty string my code is :

    @
    property string playerTurnName: ""
    function playerinfo(str,str1,str2,str3){
    console.log(str,str1,str2,str3)
    console.log("i m comming from c++ file other player name is "+str)
    playerTurnName =str
    playerTextField.text = str
    console.log("Player Display name "+ playerTurnName )
    }
    @

    playerTurnName value is successfully print in function ...bt not outside

    thankx in advance please help me

    [EDIT: code formatting, please wrap in @-tags, Volker]



  • I've removed the comment doubling the original post.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.