Hi,
I've been writing a C++ program in QT on Ubuntu and it's working ok but as I am trialling Linux, I've just copied the files from my Ubuntu system to Linux Mint 14.
I've opened the project and it loads and can see all the files but when I come to compile, I get these strange compiler issues and am stuck!
I've got the following configured in my function:-
std::string strTemp;
QSqlQuery LoadOrders;
QString querystring(strSQL.c_str());
LoadOrders.prepare(querystring);
LoadOrders.exec();
Then, I want to put the results on my table:-
strTemp = LoadOrders.value("OrderCode").toString();
BUT, I'm getting
/home/backoffice/Source/MSC Front Desk/MSCFrontDesk/mainwindow.cpp:109: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
/home/backoffice/Source/MSC Front Desk/MSCFrontDesk/mainwindow.cpp:109: error: no match for 'operator=' in 'strTemp = QVariant::toString() const()'
Now, I think this might have something to do with it but again, not sure!
/usr/include/qt4/QtSql/qsqlquery.h:89: error: initializing argument 1 of 'QVariant QSqlQuery::value(int) const' [-fpermissive]
Do you think there are fundamental differences with the qsqlquery libraries between Ubuntu and Mint?
Cheers for any pointers or help,
Carl.
I've been writing a C++ program in QT on Ubuntu and it's working ok but as I am trialling Linux, I've just copied the files from my Ubuntu system to Linux Mint 14.
I've opened the project and it loads and can see all the files but when I come to compile, I get these strange compiler issues and am stuck!
I've got the following configured in my function:-
std::string strTemp;
QSqlQuery LoadOrders;
QString querystring(strSQL.c_str());
LoadOrders.prepare(querystring);
LoadOrders.exec();
Then, I want to put the results on my table:-
strTemp = LoadOrders.value("OrderCode").toString();
BUT, I'm getting
/home/backoffice/Source/MSC Front Desk/MSCFrontDesk/mainwindow.cpp:109: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
/home/backoffice/Source/MSC Front Desk/MSCFrontDesk/mainwindow.cpp:109: error: no match for 'operator=' in 'strTemp = QVariant::toString() const()'
Now, I think this might have something to do with it but again, not sure!
/usr/include/qt4/QtSql/qsqlquery.h:89: error: initializing argument 1 of 'QVariant QSqlQuery::value(int) const' [-fpermissive]
Do you think there are fundamental differences with the qsqlquery libraries between Ubuntu and Mint?
Cheers for any pointers or help,
Carl.