wrong.PNG
This Return 2 (Error05) in combobox
What Is Wrong In Code
wrong.PNG
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.What Is Wrong In Code
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
OK This Is Code
Qt 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"); } { } } }To copy to clipboard, switch view to plain text mode
Last edited by anda_skoa; 5th March 2017 at 09:27. Reason: missing [code] tags
And so what exactly is your problem? If you have a question, ask it, just don't post code and say nothing about it.
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
Bookmarks