View Single Post
Posts: 370 | Thanked: 443 times | Joined on Jan 2006 @ Italy
#1
Hi all,

I am developing a little app for accessing our planner database while on the go from the 900 in order to register on the fly the time spent on single tasks. This work is being made in the spare time while travelling, while falling asleep instead of reading some books.

True is, I took the chance to start coding again (I have some background in Fortran, Cobol, C/C++ and lot of DB when I was young. Then came Python, almost the only language I used for small coding during last year. At present I feel a little rusty since last nice code I wrote was 4+ years ago for my 770 and the at the time borning Hildon). This time I'm taking some time to learn Qt - yes, after the shocking new of Nokia going WP, I decided so anyway - obviously going through the Python route since it is more for passion than job.

Long story short (I already wrote too much!) today I lost a whole day without results trying to access our server, due to problems with Qt Sql driver.
When running the standard PyQt example, evrything works. When trying to access a mysql database using
Code:
db=QtSql.QSqlDatabase.addDatabase("QMYSQL")
instead of
Code:
db=QtSql.QSqlDatabase.addDatabase("QSQLITE")
the following error arises:
Code:
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE
I think the problem resides in the fact that the libqt-sql-sqlite is for Qt4.7 where the libqt4-sql-mysql is for Qt4.6.2, but I had not been to solve the matter. I also tried to install the libqt4-experimental-sql-mysql package without success.
The current package situation on my N900 is as follows:
Code:
dpkg -l | grep qt | grep sql
ii libqt4-sql 4.7.0-git20100909-0maemo1+0m5
ii libqt4-sql-mysql 4.6.2-git20100205-1
ii libqt4-sql-sqlite 4.7.0-git20100909-0maemo1+0m5
ii python2.5-qt4-sql 4.7.5-maemo2
I saw in other threads the same problem, but there it had been solved (or at least it seems so by reading them) simply installing the libqt4-sql-mysql package (there were dependency problems to solve or simply the package was not installed at all). In my case, I have the aforementioned package installed, but from the description it looks like the version is not matching. All repositories enabled (extras, extras-testing and extras-devel).

Any clue?

Thanks in advance,