Hi,
I have a problem that is probably very simple, but I don't know how to do it.
I have a basic contacts book where essentially there is a combo box that you can use to scroll through names and once a name is selected it should change a text box with the persons phone number. The problem it all seems to work exept the query of the phone number.
QString *phone = ui->cmbMembers->currentText();
phone = "SELECT phone FROM contacts WHERE name = " + phone + ";";
QSqlQuery queryNumbers(phone);
ui->lblPhone->clear();
ui->lblPhone->setText(phone);
Thanks![]()
Bookmarks