I'm using the same ip address, same user name and same password to make connection. What could cause QtSqlDatabase to fail connection where psycopg2 has no problem? Am I missing something? Do both of them connect to the same port by default? Anyway to view more detail error message of QtSql?
psycopg2 conn = psycopg2.connect("dbname='byrd' host='192.168.1.6' user='xxx' password='xxx'") cur = conn.cursor() cur.execute("SELECT * FROM project") results = cur.fetchall() for result in results: print result output -- (1, 'Byrdland_and_king', 'P:\\\\Byrdland_and_king') QtSql db = QtSql.QSqlDatabase.addDatabase("QPSQL") db.setDatabaseName("byrd") db.setHostName("192.168.1.6") db.setUserName("xxx") db.setPassword("xxx") db.open() output -- False
_______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt