title: Why using "&" when using QSqlDatabase make error (Qt 5.2)?
body: <p>I always use below code to connect to a sqlite database. For some reasons, I have decided to rewrite it in a way that use <code>*QSqlDatabase</code> instead of <code>QSqlDatabase</code>.</p>
  
  <p>What I did was just to use <code>&amp;</code> in front of my old code ( <strong>Line_12</strong>  ).
  But the code crashes in <strong>line 6</strong>.</p>
  
  <p>Anyway, someone gave me <strong>line_14</strong> and It works.</p>
  
  <p>So... I can't understand What was wrong with my first code and Why suggested code make 
  it work.</p>
  
  <pre><code>Foo::Foo(QString path_="db_path_name") {
      InitialDataBase(path_);
      bool isOpened = db-&gt;open();
      if(!isOpened)   exit(1);
      else            
          queryExecutor = new QSqlQuery(*db);  // --&gt; Line_6
  }
  
  void Foo::InitialDataBase(QString path_) {
  
      // Line_12 =&gt; DOESN'T WORK
      db = &amp;(QSqlDatabase::addDatabase("QSQLITE"));   
      // Line_14 =&gt; WORK
      db  = new QSqlDatabase(QSqlDatabase::addDatabase("QSQLITE"));
  
      db-&gt;setHostName("localhost");
      db-&gt;setDatabaseName(path_);
      db-&gt;setUserName("admin");
      db-&gt;setPassword("admin");
  }
  </code></pre>