problem with messageBox
Solved
General and Desktop
-
I wrote:
QMessageBox::StandardButton Mess = QMessageBox::question(classe_main, "Spazio Esaurito su Disco","Vuoi cancellare questo file?", QMessageBox::Yes | QMessageBox::No); if (Mess == QMessageBox::Yes) { QString path_dir = path_da_usare; QDir dir(path_dir); dir.removeRecursively(); } else { //_uimainWindowobj->Info->setText("FILE NON CANCELLATO"); }
but it tells "the inferior stopped because..." but I don't know why, if I remove the messageBox is ok
-
Hi
Check ifQMessageBox::StandardButton Mess = QMessageBox::question(this, "Spazio Esaurito su Disco","Vuoi cancellare questo file?",QMessageBox::Yes | QMessageBox::No); if (Mess == QMessageBox::Yes) { } else {}
Also crashes. Im pretty sure its something else in code.
-
Hi @vale88
Can you please check the
QMessageBox::Yes
code.QString path_dir = path_da_usare; QDir dir(path_dir); dir.removeRecursively();
This removes (delets) everything.
Other than that code looks fine. -
@Pradeep-P-N yes I use it to delete a path..but the messageBox crashes and I don't know why..
-
Hi,
Wath does the crash stack trace tell you ?
-
@vale88 try simple
int Mess = QMessageBox::question(this, "Spazio Esaurito su Disco","Vuoi cancellare questo file?",QMessageBox::Yes | QMessageBox::No);
if (Mess == QMessageBox::Yes) { }
else {}