Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML slot value not access out side function

QML slot value not access out side function

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 1.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    m.azeemanwar
    wrote on last edited by
    #1

    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]

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      I've removed the comment doubling the original post.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved