title: QtSql Dynamic Select query with multiple WHERE filters
body: <ul>
  <li>I need to execute any select query using the same method.</li>
  <li>So, the query my has to filter the selected data using one value or
  more.</li>
  <li>Filters are stored in a map that has the <strong>column name</strong> as the <strong>key</strong>  and
  the <strong>filtering value</strong> as its <strong>value</strong>.</li>
  <li>So my Question is : <strong>how to add filters dynamically into Select statement?</strong></li>
  <li><p><strong>What I tried:</strong></p>
  
  <p><strong>1. QSqlQueryModel Class:</strong>
          I could create a <strong>QSqlQueryModel</strong>  object  and set a query to 
          retrieve the whole table data but, I 
          could not find any functionality in this class to filter this data : </p>
  
  <pre><code>   QSqlQueryModel *model = new QSqlQueryModel;
     model-&gt;setQuery("SELECT * FROM employee");
  </code></pre>
  
  <p><strong>2. QSqlTableModel:</strong> This class is used to view table data in a <strong>qtableView</strong>,I can use this class to read table data and then filter this data like this (I have not tried this yet):</p>
  
  <pre><code> QSqlTableModel *model = new QSqlTableModel
   model-&gt;setTable("employee");
   model-&gt;setEditStrategy(QSqlTableModel::OnManualSubmit);
   model-&gt;select();
   model-&gt;setFilter("colum5 &gt; 10");
   // I can use after that data() method to retrieve filtered data. 
  </code></pre>
  
  <p><strong>3. For Loop</strong> I thought about using for loop to add filters directly but, I would prefer a better way because I believe that QT offers a such service.</p></li>
  </ul>
  
  <hr>
  
  <p><strong>The method shall looks like this:</strong></p>
  
  <pre><code>/**
   * @brief getData executes sql select query.
   * @param query [out] QSqlQuery query object after executing the query.
   * @param queryFilters [in] map of query filters (column-name, filter- 
     value).
   * @param table [in] table name.
   * @return 
   */
  bool getData(QSqlQuery &amp;query, std::map&lt;std::string,QVariant&gt; &amp;queryFilters, 
  std::string &amp;table){
          bool status = false;
          std::string queryText = "SELECT * from " + table + " WHERE  ";
          // I should apply filters from queryFilters map here.
          return status;
  } 
  </code></pre>