Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
switch( QMessageBox::information( this, "Qt Application Example",
"The document has been changed since "
"the last save.",
"Save Now", "Cancel", "Leave Anyway",
0, 1 ) ) {
case 0:
save();
ce->accept();
break;
case 1:
default: // just for sanity
ce->ignore();
break;
case 2:
ce->accept();
break;
}
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
if ( rows.exist() )
{
switch ( QMessageBox::warning(
this, "Overwrite map?",
"A sensor map already exists for this user id.\n"
"If you continue, that map will be erased and the new map will be uploaded.\n"
"Continue?",
"&Yes", "&No", QString::null, 1, 1 ) )
{
case 0:
overwrite();
break;
default:
break;
}
}
|