QSqlDatabase db = QSqlDatabase::addDatabase("QODBC");db.setHostName("localhost");db.setDatabaseName("myBase");//...