Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Problems using sql bindvalue in QT 5.1
diego last edited by
the code below works in qt 4.8
qint32 id = 1;
query.prepare(QString("SELECT image_id, name FROM backgrounds WHERE id = :id"));
the “query.executedQuery()” return “SELECT image_id, name FROM backgrounds WHERE id = ?”
instead "SELECT image_id, name FROM backgrounds WHERE id = 1"
This sounds like a bug, did you check the "bug report system":bugreports.qt-project.org/issues/ ?
If nothing's there you can try to ask on the interest mailing list, you'll find Qt's developers/maintainers there (this forum is more user oriented) and maybe open a bug report (don't forget to add you OS, Qt versions etc...)