<div>Hi everybody! I am a newbie for PyQT.Now I am write a simple programm which use mysql as its database,but I find it is very diffucult to use the PyQT APIs.I write sth like that:</div>
<div> </div>
<div><font color="#ff6666">db = QtSql.QSqlDatabase.addDatabase("QMYSQL")</font></div>
<div><font color="#ff6666">db.setHostName("<a href="http://127.0.0.1">127.0.0.1</a>")<br>db.setDatabaseName("test")<br>db.setUserName("root")<br>db.setPassword("123456")</font></div>
<div><font color="#ff6666">db.open()</font></div>
<div><font color="#ff6666"></font> </div>
<div align="left"><font color="#000000">but it just doesn't work.PS:My mysql version is 5.1,is that the problem? I try to use MySQLdb to implement my own QSqlDriver and </font>QSqlResult,Could anybody give me some examples?</div>