title: PostgreSql, QSqlDatabase: Failed to open Database
body: <p>My system: Windows 10 Pro 16299, Qt, PyQt 5.11.2, Python 3.6, PostgreSql 10</p>
  
  <p>I tried to use QTableView/QSqlTableModel for in my gui to work with postgresql data. However, I am not able to open the database. I get the error message “Driver not loaded Driver not loaded”.</p>
  
  <p>A new installation of Qt, PostgreSql and PyQt has not solved the problem. I tried also “Dependency Walker” to look for missing dlls, but was not able use the given information.</p>
  
  <p>Do you have an idea how to fix this problem? </p>
  
  <p>As an alternative: Is it possible to use QTableView/QSqlTableModel with psycopg2 (instead of QSqlDatabase)?</p>
  
  <p>Thank you very much in advance!</p>
  
  <hr>
  
  <pre><code>from PyQt5.QtSql import QSqlDatabase, QSqlQuery, QSqlTableModel  
  from PyQt5.QtWidgets import QTableView, QApplication  
  import sys
  
  if __name__ == '__main__':
  
    app = QApplication(sys.argv)  
    db = QSqlDatabase.addDatabase("QPSQL")   
    db.setHostName("localhost")  
    db.setPort(5432)  
    db.setDatabaseName("Test")  
    db.setUserName("postgres")  
    db.setPassword("xxxxx")  
    if (db.open() == False):  
      QMessageBox.critical(None, "Error", db.lastError().text())   
    else:  
      Print("Connected")
  </code></pre>
  
  <hr>
  
  <p>Dependency Walker Screenshot</p>
  
  <p><img src="https://i.stack.imgur.com/iOxix.jpg" alt=""></p>