title: Qt + search engine API
body: <p>I need google (or other engine) search in my <em>desktop</em> program.
  Could you please give me an example how to send a POST request to API and get the answer.
  I use Qt and C++.</p>
  
  <p>For example this code doesn't work (it's about yandex API):</p>
  
  <pre><code>QString* query = new QString("&lt;?xml version=""1.0"" encoding=""UTF-8""?&gt;"
                               "&lt;request&gt;&lt;query&gt;" + ui-&gt;search_le-&gt;text().toUtf8() +
                               "&lt;/query&gt;&lt;groupings&gt;&lt;groupby attr=""d"""
                               "mode=""deep""groups-on-page=""10""docs-in-group=""1"" /&gt;"
                               "&lt;/groupings&gt;&lt;/request&gt;");
  
  QUrl apiurl = QUrl("http://xmlsearch.yandex.ru/xmlsearch?user=*******&amp;"
                     "key=03.*******:**************f01e29f007af7994e951");
  
  manager = new QNetworkAccessManager();
  request = new QNetworkRequest(apiurl);
  reply = manager-&gt;post(*request, query-&gt;toUtf8());
  
  QString answer = QString::fromUtf8(reply-&gt;readAll());
  </code></pre>
  
  <p>And I really don't know how to find the problem.</p>
  
  <p>Thanks all who will be able to help me.</p>