QFileDialog issue
-
Hello!
I am using a QFileDialog to obtain a folder path. I don't know why this process take a lot of time. (about a minute). I don't know if is a QFileDialog issue of Qt or something like this. This is my code:
QString sDirectory; sDirectory = QFileDialog::getExistingDirectory(this, tr("Open directory"), QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); ui->labelCalibrationPath->setText(sDirectory);As you can see, this is a very simple code.
Any idea of what is happening here?
Thank you very much!!
-
Hello!
I am using a QFileDialog to obtain a folder path. I don't know why this process take a lot of time. (about a minute). I don't know if is a QFileDialog issue of Qt or something like this. This is my code:
QString sDirectory; sDirectory = QFileDialog::getExistingDirectory(this, tr("Open directory"), QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); ui->labelCalibrationPath->setText(sDirectory);As you can see, this is a very simple code.
Any idea of what is happening here?
Thank you very much!!
-
Hi
what platform ?
I have seen this on windows with a network share that was not available. -
Hi, and you are very sure its not inside project ?
even clean one does it?Do you have had any network shares ?
@mrjj said in QFileDialog issue:
Hi, and you are very sure its not inside project ?
even clean one does it?
Do you have had any network shares ?I've tried with an empty project and it works fine. So, it could be that you say but I don't know what do you mean with network shares
-
@mrjj said in QFileDialog issue:
Hi, and you are very sure its not inside project ?
even clean one does it?
Do you have had any network shares ?I've tried with an empty project and it works fine. So, it could be that you say but I don't know what do you mean with network shares
-
@mrjj said in QFileDialog issue:
Hi, and you are very sure its not inside project ?
even clean one does it?
Do you have had any network shares ?I've tried with an empty project and it works fine. So, it could be that you say but I don't know what do you mean with network shares
@ivanicy
You may also be interested in reading through https://forum.qt.io/topic/95305/checking-run-time-characteristics-for-qfiledialog-getopenfilename. That is discussing a user experiencing long delays with a file dialog, though in a different situation.You might follow some of my suggestions there. You might also try passing
DontUseNativeDialogand see whether that affects the situation (I find the docs confusing as to whethergetExistingDirectory()respects this flag under Windows, but you could try.)