Sry for the dumb question, but I'm not very experienced with C++ and I don't manage find the appropriate return type of the following function:
?? MyClass::selectFile(){
tr("Select file"), qgetenv("HOMEPATH")+"\\Desktop", tr("File(*.hex)"));
if(fileName==NULL)
return NULL;
return ??;
}
?? MyClass::selectFile(){
const QString fileName = QFileDialog::getOpenFileName(this,
tr("Select file"), qgetenv("HOMEPATH")+"\\Desktop", tr("File(*.hex)"));
if(fileName==NULL)
return NULL;
QFile file(fileName);
return ??;
}
To copy to clipboard, switch view to plain text mode
Bookmarks