What is wrong with this code:
Qt Code:
void CCustomerUpdateDialog::slotZipcodeChanged(int iIndex) { QSqlQuery retrieveCityNameQuery("SELECT * FROM kraj k WHERE k.POSTNA_STEVILKA="+m_pZipcode->currentText()); { qDebug() << retrieveCityNameQuery.lastError(); } else { m_pCity->setText(retrieveCityNameQuery.value(1).toString()); } };To copy to clipboard, switch view to plain text mode
I select a zip code of an city and in the QLineEdit should provide then after click the name of city with selected Zip Code. But, sql i generated ok (double check), QLineEdity still stays empty! Why?
Bookmarks