Is the break; line executed , can you see the debug text ?
while (query.next()) {
....
if(aa != ui.validator->text())
{
....
if (msgBox.clickedButton() == connectButton)
{
qDebug() << "before break";
break;
}
}
while (query.next()) {
....
if(aa != ui.validator->text())
{
....
if (msgBox.clickedButton() == connectButton)
{
qDebug() << "before break";
break;
}
}
To copy to clipboard, switch view to plain text mode
everything below the "break" statement will not be executed, same as here:
#include <iostream>
int main(){
while( 1 ){
std::cout << "in while..."; // this will be visible only once
if( 1 ){
if( 1 ){
break; // while loop will end here
}
}
std::cout << "after break..."; // this will not be visible
}
return 0;
}
#include <iostream>
int main(){
while( 1 ){
std::cout << "in while..."; // this will be visible only once
if( 1 ){
if( 1 ){
break; // while loop will end here
}
}
std::cout << "after break..."; // this will not be visible
}
return 0;
}
To copy to clipboard, switch view to plain text mode
Bookmarks