pDB = QSqlDatabase::addDatabase("QSQLITE"); pDB.setDatabaseName(QString("nata.dat").arg(QCoreApplication::applicationDirPath()));
QFile file("out.txt"); if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) return; QTextStream out(&file); out << "The magic number is: " << 49 << "\n";
C++ (Qt)QString absoluteFilePath ( const QString & fileName ) const
QDir binDir(QCoreApplication::applicationDirPath()); QString str = binDir.absoluteFilePath("nata.dat");