Reply
Thread Tools
Posts: 2 | Thanked: 0 times | Joined on Jun 2011
#1
Good Day All.
Ive been writing small apps in qt for a while and have decided to try writting a mobile app for my N900. I have written the code And it works great on my linux development box.

THen having installed MADDE i am able to deploy the program to the N900 using mad developer.
THe program loads but i get the followin error displayed

Code:
Killing remote process(es)...
Starting remote process ...
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE
QSqlQuery::exec: database not open
I keep reading that i must install the qt mysql plugin on the n900
I do so but still get the error

Code:
ii  libqt4-appdownloader-comm                           0.3.5                                      library for communication with maemo.org downloads 
ii  libqt4-bearer-hotfix                                4.7.0~git20101112-0maemo1                  Qt 4 Bearer Hotfix
ii  libqt4-core                                         4.7.0~git20100909-0maemo1+0m5              Qt 4 core module
ii  libqt4-dbus                                         4.7.0~git20100909-0maemo1+0m5              Qt 4 D-Bus module
ii  libqt4-declarative                                  4.7.0~git20100909-0maemo1+0m5              Qt 4 declarative module
ii  libqt4-experimental-core                            4.7.0~git20101111-0maemo1                  Qt 4 core module
ii  libqt4-experimental-gui                             4.7.0~git20101111-0maemo1                  Qt 4 GUI module
ii  libqt4-experimental-sql                             4.7.0~git20101111-0maemo1                  Qt 4 SQL module
ii  libqt4-experimental-sql-mysql                       4.7.0~git20100728                          Qt 4 MySQL plugin
ii  libqt4-experimental-svg                             4.7.0~git20101111-0maemo1                  Qt 4 SVG module
ii  libqt4-gui                                          4.7.0~git20100909-0maemo1+0m5              Qt 4 GUI module
ii  libqt4-maemo5                                       4.7.0~git20100909-0maemo1+0m5              Qt 4 Maemo5 module
ii  libqt4-multimedia                                   4.7.0~git20100909-0maemo1+0m5              Qt 4 Multimedia Libraries
ii  libqt4-network                                      4.7.0~git20100909-0maemo1+0m5              Qt 4 network module
ii  libqt4-opengl                                       4.7.0~git20100909-0maemo1+0m5              Qt 4 OpenGL module
ii  libqt4-phonon                                       4.7.0~git20100909-0maemo1+0m5              Qt 4 Phonon Libraries
ii  libqt4-script                                       4.7.0~git20100909-0maemo1+0m5              Qt 4 script module
ii  libqt4-sql                                          4.7.0~git20100909-0maemo1+0m5              Qt 4 SQL module
ii  libqt4-sql-mysql                                    4.6.2~git20100205-1                        Qt 4 MySQL plugin
ii  libqt4-sql-sqlite                                   4.7.0~git20100909-0maemo1+0m5              Qt 4 SQLite plugin
ii  libqt4-svg                                          4.7.0~git20100909-0maemo1+0m5              Qt 4 SVG module
ii  libqt4-translations                                 4.7.0~git20100909-0maemo1+0m5              Qt 4 translations
ii  libqt4-webkit                                       4.7.0~git20100909-0maemo1+0m5              Qt 4 WebKit module
ii  libqt4-xml                                          4.7.0~git20100909-0maemo1+0m5              Qt 4 XML module
ii  libqt4-xmlpatterns                                  4.7.0~git20100909-0maemo1+0m5              Qt 4 XML Patterns module
ii  libqtm-12-contacts                                  1:1.2.0~tp1-0fn~fremantle6                 Qt Mobility contacts module
ii  libqtm-12-organizer                                 1:1.2.0~tp1-0fn~fremantle6                 Qt Mobility Organizer module
ii  libqtm-12-serviceframework                          1:1.2.0~tp1-0fn~fremantle6                 Qt Mobility service framework module
ii  libqtm-12-versit                                    1:1.2.0~tp1-0fn~fremantle6                 Qt Mobility versit module
ii  libqtm-bearer                                       1:1.0.2-maemo4+0m5                         Qt Mobility Bearer module
ii  libqtm-contacts                                     1:1.0.2-maemo4+0m5                         Qt Mobility contacts module
ii  libqtm-location                                     1:1.0.2-maemo4+0m5                         Qt Mobility location module
ii  libqtm-messaging                                    1:1.0.2-maemo4+0m5                         Qt Mobility messaging module
ii  libqtm-multimedia                                   1:1.0.2-maemo4+0m5                         Qt Mobility multimedia module
ii  libqtm-publishsubscribe                             1:1.0.2-maemo4+0m5                         Qt Mobility publish and subscribe module
ii  libqtm-sensors                                      1:1.0.2-maemo4+0m5                         Qt Mobility sensors framework module
ii  libqtm-serviceframework                             1:1.0.2-maemo4+0m5                         Qt Mobility service framework module
ii  libqtm-systeminfo                                   1:1.0.2-maemo4+0m5                         Qt Mobility system information module
ii  libqtm-versit                                       1:1.0.2-maemo4+0m5                         Qt Mobility versit module
ii  libtelepathy-qt4-0                                  0.2.0-2maemo7+0m5                          Telepathy framework - Qt 4 library
ii  navit-graphics-qt-qpainter                          0.2.0+dfsg.1-1maemo1~3479                  Car navigation system with routing engine - Qt grap
ii  python2.5-qt4-common                                4.7.3-maemo5                               Shared files for PyQt4
ii  python2.5-qt4-core                                  4.7.3-maemo5                               Python bindings for Qt4 Core components.
ii  python2.5-qt4-gui                                   4.7.3-maemo5                               Python bindings for Qt4 Core components.
rc  qtirreco                                            0.3.0-1                                    QtIrreco - Ir Remote Control
ii  qtm-maemo-metapackage                               1.3-2+0m5                                  Qt Mobility meta package update for Maemo
ii  qtm-modest-plugin                                   0.0.2-6+0m5                                Qt-Mobility Plugin for Modest
ii  qtquickcompat                                       0.1.0                                      Makes 'QtQuick 1.0' QML namespace available in Qt 4

So i do have it installed.
i also have this in my .pro file

Code:
symbian:TARGET.UID3 = 0xE2CE1EEB

# Allow network access on Symbian
symbian:TARGET.CAPABILITY +=  NetworkServices

QT       += core gui \
        network \
        sql \
Do you or anyone else know how to get it working

Regards
 
Posts: 141 | Thanked: 41 times | Joined on Apr 2011 @ Ahmedabad, India
#2
Can you run the below code to verify that the required drivers are installed ?

#include <QCoreApplication>
#include <QSqlDatabase>
#include <QSqlError>
#include <QStringList>
#include <QtDebug>
int main( int argc, char **argv )
{
QCoreApplication app( argc, argv );
qDebug() << QSqlDatabase::drivers();
QSqlDatabase db( QSqlDatabase::addDatabase( "QMYSQL" ) );
qDebug() << db.lastError();
}

If the output of this code shows that drivers are installed, then make sure you create QApplication or QCoreApplication instance before you use classes from the QtSql module.

If the instance is created at a later stage, then also it throws such errors
 
Posts: 2 | Thanked: 0 times | Joined on Jun 2011
#3
Originally Posted by dtparikh View Post
Can you run the below code to verify that the required drivers are installed ?

#include <QCoreApplication>
#include <QSqlDatabase>
#include <QSqlError>
#include <QStringList>
#include <QtDebug>
int main( int argc, char **argv )
{
QCoreApplication app( argc, argv );
qDebug() << QSqlDatabase::drivers();
QSqlDatabase db( QSqlDatabase::addDatabase( "QMYSQL" ) );
qDebug() << db.lastError();
}

If the output of this code shows that drivers are installed, then make sure you create QApplication or QCoreApplication instance before you use classes from the QtSql module.

If the instance is created at a later stage, then also it throws such errors
I get the following output

Code:
Killing remote process(es)...
Starting remote process ...
("QSQLITE") 
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE
QSqlError(-1, "Driver not loaded", "Driver not loaded") 
Killing remote process(es)...
Finished running remote process. Exit code was 0.
 
Posts: 435 | Thanked: 762 times | Joined on Apr 2010
#4
Hello, try this package, but install it in this way: extract the deb with dpkg -x and copy the so file in /usr/lib/qt4/plugins/sqldrivers. Doing that I get MySql3 and MySql as available drivers. Let me know if you can access the database pls.

EDIT: just tested, it works and I can access db on laptop from N900.

Last edited by gionni88; 2011-06-07 at 10:41.
 

The Following 3 Users Say Thank You to gionni88 For This Useful Post:
Posts: 323 | Thanked: 115 times | Joined on Jul 2010
#5
Thank You Gionni88! It works!!!
I can access with pyqt on mysql.
(Tutorial:
http://solaajayi.wordpress.com/2011/...ql-using-pyqt/)

Do you also have a work arround for mysql.so for php in phpinfo()?

Last edited by gerdich; 2012-04-23 at 15:20.
 
Posts: 84 | Thanked: 45 times | Joined on Jan 2012 @ Damascus Syria
#6
Hello guys .
Can anyone help me here plz?
Thanks in advance
__________________
استغفر الله العظيم الذي لا إله الا هو الحي القيوم و أتوب اليه
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 19:13.