title: How to load drivers in qt?
body: <p>I am using Ubuntu and I have Qt offline which is installed from an offline installer.
  While connecting to MySQL database I have got an error</p>
  
  <pre><code>QSqlDatabase: QMYSQL driver not loaded
  QSqlDatabase: available drivers: QSQLITE QSQLITE2
  QSqlError(-1, "Driver not loaded", "Driver not loaded") 
  Failed to connect.
  The program has unexpectedly finished.
  </code></pre>
  
  <p>now I tried this code </p>
  
  <pre><code>#include &lt;QCoreApplication&gt;
  #include &lt;QSqlDatabase&gt;
  #include &lt;QStringList&gt;
  #include &lt;QtDebug&gt;
  
  int main( int argc, char **argv )
  {
  QCoreApplication app( argc, argv );
  qDebug() &lt;&lt; QSqlDatabase::drivers();
  }
  </code></pre>
  
  <p>and got output</p>
  
  <pre><code>("QSQLITE", "QSQLITE2") 
  </code></pre>
  
  <p>then how to connect my Qt to MySQL database?
  I successfully connected to sqlite database.</p>