PDA

View Full Version : Sql qt



Dirty_Dylan
27th May 2012, 10:20
Hey I am fairly new to C++ and QT. I am currently attempting to work out how to connect to a SQLITE database with QT and am having trouble :( So essentially all my program does is connect to a database and then make a messagebox with the results of the query. The error I am currently getting is " no matching function for call to 'QMessageBox::setText(QStringList&)' " I am using 'Qt Creator 2.4.1' on 32 bit linux but would like my code to be easily cross compiled for windows as well.... If that makes a difference.

Thanks Dylan.

Zlatomir
27th May 2012, 11:22
You call setText with a QStringList (http://qt-project.org/doc/qt-4.8/QStringList.html) and the setText (http://qt-project.org/doc/qt-4.8/qmessagebox.html#text-prop) gets a QString Parameter.

//It looks like your problem has nothing to do with SQL, what i try to say is that next time you should try to put a title that describes your problem, it helps you to get answers and it helps others that might search for the same answer later.

sonulohani
1st June 2012, 12:22
Send the code So that we can figure out that what is really the main problem that you're facing?