title: Wait until button pressed(QT)
body: <p>this is my first post on SO ^_^</p>
  
  <p>I'm trying to implement a <a href="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2013/01/scramble-01.jpg" rel="nofollow">letter scramble game</a> with QT framework. The main part is finished, but now i'm stunned - i can't figure out how to make program to wait for button to be pressed inside of a game.</p>
  
  <p>Please help me with it. Thanks in advance</p>
  
  <p>Here is pseudocode of my gaming cycle: </p>
  
  <pre><code>//initialize grid, score, time
  
  // accept words until timer expires
  while (true)    {
  
      // draw the current state of the grid
  
      // log board
  
      // get current time
  
      // report score
  
      // check for game's end
  
      // report time remaining
  
      // prompt for word and converting it to char*
      //HOW TO WAIT UNTILL BUTTON PRESSED????!!!!
  
      // check whether to scramble grid
  
      // or to look for word on grid and in dictionary
  }
  </code></pre>
  
  <p>P.S. Since it's my first post here, i'll appreciate any suggestions on how to compose questions more correctly.</p>