I need to copy the full filepath, without filename, into a QString from QFileDialog below.
QString fileName = QFileDialog::getOpenFileName(this, tr(\
You use QString QFileInfo::absolutePath() const for this. See the documentation for details.
QString QFileInfo::absolutePath() const
QFileInfo fileInfo(QFileDialog::getOpenFileName(this, tr("Select app to install"), '/' , tr("APK Files (*.apk)"))); qDebug() << fileInfo.absolutePath();