Of course you cannot see the message box:
{
msg.show();
return; // message box is destroyed here
}
{
QMessageBox msg(QMessageBox::Information, "DEBUG", "File not readable", QMessageBox::Ok);
msg.show();
return; // message box is destroyed here
}
To copy to clipboard, switch view to plain text mode
Message box is deleted immediately after creation, use "exec()" instead of "show()". Or try with static methods:
{
QMessageBox::information(this,
"DEBUG",
"File not readable");
// blocks until message box is closed return;
}
{
QMessageBox::information(this,"DEBUG", "File not readable"); // blocks until message box is closed
return;
}
To copy to clipboard, switch view to plain text mode
Bookmarks