Get these errors :
C2143: syntax error : missing ',' before ':'
C2143: syntax error : missing ';' before '{'
Here is code:
void MainWindow::PrintDir(const QString &str)
{
QDir mDir(str);
QString buffer;
for(QFileInfo temp : mDir.entryInfoList()) //first error
{ //second error
buffer += temp.absoluteFilePath() + "\n";
}
ui->textEdit->setText(buffer);
}
I guess the reason is C++ standard? I try to include him in pro file like this CONFIG += c++11
but nothing happen and still get same errors. Whats wrong?
UPD: