Results 1 to 3 of 3

Thread: passing signals in qml

  1. #1
    Join Date
    May 2011
    Posts
    120
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    33

    Default passing signals in qml

    Hai,
    I need to pass a signal when clicking "player2" button to javascript.

    Before we start to play the game we can choose who wants to go first. if we select player1, player1 will play first or if we select player2 button player2 starts first. but i am unable to connect the mouse area to javascript to select the type of the player. can some one help me in this ? its urgent

  2. #2
    Join Date
    Apr 2011
    Posts
    36
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    3
    Thanked 3 Times in 2 Posts

    Default Re: passing signals in qml

    import ".js" as Logic;

    MouseArea{
    id:mousearea
    onClicked:Logic.buttonClick() // buttonclick() function in .js file
    }

  3. The following user says thank you to hema for this useful post:

    vinayaka (5th August 2011)

  4. #3
    Join Date
    May 2011
    Posts
    120
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    33

    Default Re: passing signals in qml

    thanx, i did it already but i am unable to get the type of the player who goes first to play ?

Similar Threads

  1. Replies: 6
    Last Post: 29th April 2011, 16:22
  2. Replies: 1
    Last Post: 24th October 2010, 12:09
  3. Passing signals
    By gruszczy in forum Qt Programming
    Replies: 2
    Last Post: 16th July 2008, 15:19
  4. conflict between boost signals and Qt signals
    By high_flyer in forum Qt Programming
    Replies: 2
    Last Post: 26th June 2008, 10:46
  5. QThread and signals (linux/UNIX signals not Qt Signals)
    By Micawber in forum Qt Programming
    Replies: 1
    Last Post: 28th November 2007, 23:18

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.