×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Dec 2011
    Posts
    30

    qml wait for sending signal....on image clicked

    i am developing app for meego.i have an issue i m sending a signal from qml on image clicked .as

    Image {
    id: redPawn4
    x: 111
    y: 522
    source: "r.png"
    MouseArea{
    anchors.fill: parent
    onClicked:
    {

    if(p1ballon4.opacity ==1 && currentColor == appWindow.redCastle){
    var a = getData()
    currentPlayer= firstPlayerName
    p1ballon4.opacity=0
    appWindow.eligiblePawnClicked(currentPlayer, a, 3,Math.ceil(sumOfScore/6))

    }
    }
    }
    }
    i want to wait here for sending signal appWindow.elig...... how can i do
    thankx

  2. #2
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,956

    Re: qml wait for sending signal....on image clicked

    If i got it right , you want to wait after that signal is called or before that..if yes then what is the purpose of waiting there? as soon as code reaches the line it will simple get executed.

  3. #3
    Nokia Developer Moderator
    Join Date
    Mar 2009
    Posts
    1,024

    Re: qml wait for sending signal....on image clicked

    Hi,
    If you want to wait you have to use a Timer element.
    onClicked activates the timer which sends the signal appWindow.eligib...
    code is quite easy.. you should add very few lines.

  4. #4
    Registered User
    Join Date
    Dec 2011
    Posts
    30

    Re: qml wait for sending signal....on image clicked

    sir vineet .jain actually i am developing luddo application and i want when this image is clicked a signal has need to send and i want to show next activity after some time .bt in presant case i cant do as..is there any way to wait there....i cant use timer because this signal goes on 16 different places with different values.
    i just want to know is there any way to wait in qml expect timer

    but here when i send signal at the same time all my values set according to that signal....but i want there should be some delay .

  5. #5
    Registered User
    Join Date
    Dec 2011
    Posts
    30

    Re: qml wait for sending signal....on image clicked

    hello gnuton,
    thanks for replying but my issues this signal is sending from 16 different places. with different vlaues..then i dont think i can use timer...

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2009
    Posts
    1,024

    Re: qml wait for sending signal....on image clicked

    There is no sleep function in QML.
    If if there was sleep function as in C/C++ it would have blocked the entire thread for N ms.
    This is unacceptable.

    So the only approach available is using timers.
    You can use 1 timer and you can define as property the values to send.

    if (!timer.running){
    timer.myValue = "hello"
    timer.running = true
    }

    In case timers can run all at the same time. Then you have to define 16 of them.

Similar Threads

  1. Image map based on colour of clicked pixel?
    By craigmcdonnell in forum Symbian Web Runtime
    Replies: 0
    Last Post: 2010-06-27, 02:49
  2. How to get image file clicked by camera
    By shashideokar10 in forum Symbian C++
    Replies: 17
    Last Post: 2009-06-19, 09:32
  3. how to wait until I have a static image from GoogleMap
    By soofika in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2008-09-16, 20:16
  4. Unable to draw image when clicked
    By ckt in forum Symbian C++
    Replies: 1
    Last Post: 2006-09-30, 07:52
  5. yield lock signal wait...
    By harp73 in forum Python
    Replies: 4
    Last Post: 2005-07-09, 14:20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •