title: Connect to PostgreSQL server with "cert" authentication method using QSqlDatabase
body: <p>I need to communicate with PostgreSQL database from my Qt application, but the server uses "cert" authentication method, so I need to pass my certificates to the server.</p>
  
  <p>The only solution I see for now is to obtain <code>PGconn*</code> like this:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>QSqlDatabase db;
  //.....
  PGconn* conn = (PGconn*)db.driver()-&gt;handle()-&gt;data();
  </code></pre>
  
  <p>and do some work with it. Or even reject QSqlDatabase and use <code>libpq</code> directly.</p>
  
  <p>Is there any other way to do this without using <code>libpq</code> from my code? For example, something like this:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>//hypothetic QSqlDatabase methods:
  QSqlDatabase db;
  //.....
  db.SetSslCert("/path/to/my/cert.crt");
  db.SetSslKey("/path/to/my/cert.key");
  //.....
  </code></pre>