kulsekarr
20th March 2015, 13:08
Hi all,
I am able to open a fileDialog and get the file name (for example:) before selecting the filename, if I click the cancel button or close the fileDialog the messagebox is displayed which is in the code
But the message box should be displayed after the open button is clicked, right now it is displayed if i click cancel button or close the fileDilaog. anyone can give some suggestions.
I have attached the code
if (!QFile::exists(f+func))
{
fileName = QFileDialog::getOpenFileName(this,tr("Open CSV File"), "", tr("CSV Files (*.csv)"));
QFile::copy(fileName, f+func);
QMessageBox::information(this,tr("Batgenerator"),tr("Import table succeed"));--------> MESSAGE box to be displayed after clicking open
m_buttonimporttable->show();
if((m_listCSVmajCSV->selectedItems().count()==1))
{
m_buttonAddVarToFile->show();
m_buttonMajCSV->show();
m_checkBkMajCSV->show();
}
}
Thanks in Advance!
I am able to open a fileDialog and get the file name (for example:) before selecting the filename, if I click the cancel button or close the fileDialog the messagebox is displayed which is in the code
But the message box should be displayed after the open button is clicked, right now it is displayed if i click cancel button or close the fileDilaog. anyone can give some suggestions.
I have attached the code
if (!QFile::exists(f+func))
{
fileName = QFileDialog::getOpenFileName(this,tr("Open CSV File"), "", tr("CSV Files (*.csv)"));
QFile::copy(fileName, f+func);
QMessageBox::information(this,tr("Batgenerator"),tr("Import table succeed"));--------> MESSAGE box to be displayed after clicking open
m_buttonimporttable->show();
if((m_listCSVmajCSV->selectedItems().count()==1))
{
m_buttonAddVarToFile->show();
m_buttonMajCSV->show();
m_checkBkMajCSV->show();
}
}
Thanks in Advance!