Attachment 12375
This Return 2 (Error05) in combobox
What Is Wrong In Code
Printable View
Attachment 12375
This Return 2 (Error05) in combobox
What Is Wrong In Code
If you want to post code, post text, not an image.
And it would be helpful to state what your actual question or problem is.
Cheers,
_
As anda_skoa says, post code, not a picture of code.
Nothing is wrong in the code. The variable "checksam" doesn't contain the string you are looking for, so the code does what you told it to do: it puts the string "ERR05" in the combobox.Quote:
What Is Wrong In Code
OK This Is Code
Code:
void MainWindow::on_pushButton_29_clicked() { foreach (const QSerialPortInfo&info, QSerialPortInfo::availablePorts()){ QString checksam; checksam=info.description(); if (checksam.contains("SAMSUNG MOBILE USB MODEM")) { ui.samlogs->append(info.description()); } else { ui.samlogs->append("NO SAMSUNG MOBILE FOUND PLEASE CONECT YOUR PHONE"); } { } } }
And so what exactly is your problem? If you have a question, ask it, just don't post code and say nothing about it.