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

Qt Code:
  1. if (!QFile::exists(f+func))
  2. {
  3. fileName = QFileDialog::getOpenFileName(this,tr("Open CSV File"), "", tr("CSV Files (*.csv)"));
  4.  
  5. QFile::copy(fileName, f+func);
  6.  
  7. QMessageBox::information(this,tr("Batgenerator"),tr("Import table succeed"));--------> MESSAGE box to be displayed after clicking open
  8. m_buttonimporttable->show();
  9.  
  10. if((m_listCSVmajCSV->selectedItems().count()==1))
  11. {
  12. m_buttonAddVarToFile->show();
  13. m_buttonMajCSV->show();
  14. m_checkBkMajCSV->show();
  15. }
  16. }
To copy to clipboard, switch view to plain text mode 

Thanks in Advance!