title: how to get list of all folders with their name on google-drive
body: <p>I am making an application in qt/c++ and I wanted to upload images to a specific folder.I tried to get list of all folders but it does not provide me names of folder.I wanted to get their names so that user can select a particular folder from list of folders and I could upload to that specific folder.My code:<a href="http://pastebin.com/dBGkpeEj" rel="nofollow">http://pastebin.com/dBGkpeEj</a>   In response from this code I get kind,etag,selflink and items array in which each item has foll. fields:kind=drive#childReference,id,selflink,childlink.  I want to get name of all folders<br>
  I got it solved by myself.Here's code to get list of all folders and subfolders in qt:</p>
  
  <pre><code>void googled::tryFolderListing(QNetworkReply *reply){
  am = new QNetworkAccessManager;
  
  QByteArray d = reply-&gt;readAll();
  QString x = getValue(d,"access_token");
  x = "Bearer " + x;
  QUrl url("https://www.googleapis.com/drive/v2/files");
  url.addQueryItem(QString("q").toAscii(),QString("mimeType = 'application/vnd.google-apps.folder'").toAscii());
  QNetworkRequest request;
  request.setUrl(url);
  request.setRawHeader(QString("Content-Type").toAscii(),QString("application/json").toAscii());
  request.setRawHeader(QString("Authorization").toAscii(),x.toAscii());
  QObject::connect(am, SIGNAL(finished(QNetworkReply *)),
  this, SLOT(uploadfinishedSlot(QNetworkReply *)));
  am-&gt;get(request);
  </code></pre>
  
  <p>}</p>