Hello i'm working with qt 4.3.4 and i try to make an app that have this functionality.
Save data before load other data, to do this i implement to functions one to load and other to save. In the load function i ask if exist any data to save if this is true y ask if the user want to save this data before load other. If the answer is true y execute the save function before show QFileDialog to load the data, but here is the problem in the save function i create a QDialog to give to user the option to select the data he want to save and the QFileDialog in the load function execute before QDialog (select data).
this more less the code (i dont post the complete code because is extense and make cloudy the problem)
void load()
{
if (existData)
if (QMessageBox::question(this, "Program", "you want to save", QMessageBox:

k | QMessageBox::Cancel) == QMessageBox:

k)
save();
QString kFileName = QFileDialog::getOpenFileName(this,
tr("load data"), QDir::home().path(), tr("data (*.aa)"));
.....
load data
.....
}
void save()
{
think the dialog show the data to select
QDialog* k = new QDialog(this);
k->setModal(true);
k->show();
...
save data
...
}
please if you know the answer to this problem write me
pd: please excuse my bad english