title: Qt: Call a function with arguments periodically
body: <p><strong>Problem</strong>: 
  I have a function <code>void myFunc(data)</code></p>
  
  <p>I am reading data from database using QSqlQuery:</p>
  
  <pre><code>QSqlQuery qry;
  if (qry.exec("SELECT data, interval from table"))
  {
     while(qry.next())
     {
         // Somehow create and call function: myFunc(int data) periodically with interval = interval
     }
  }
  </code></pre>
  
  <p>As far as I understand I could use a timer like that:</p>
  
  <pre><code>QTimer *timer = new QTimer(this);
  connect(timer, SIGNAL(timeout()), this, SLOT(myFunc()));
  timer-&gt;start(interval); //time specified in ms
  </code></pre>
  
  <p>but how can I pass argument <code>data</code> to <code>myFunc</code> when I create this timer?</p>