Hi,
i just was updating a Qt Application of our company and during testing i found some strange behaviour with QFileDialog::getExistingDirectory. This always worked correct but now i get an empty dialog containing only the title message and the buttons. The folder selection list has gone and i have no clue why. We are using Qt 4.7.4 and the application (as also Qt) is x64. I attached a screenshot of the dialog that opens and here the code. Normally i would say that you cannot make any mistakes using this function. As it has worked before and i did not changed anything in this class i'm wondering whats the problem.
if (qsFolder.isEmpty())
qsFolder = pValue->getDefault().toString();
qsFolder
= QDir::fromNativeSeparators(qsFolder
);
qsFolder
= QFileDialog::getExistingDirectory(this,
"Select capture folder", qsFolder
);
qsFolder
= QDir::toNativeSeparators(qsFolder
);
if (qsFolder.isEmpty())
qsFolder = pValue->getDefault().toString();
qsFolder = QDir::fromNativeSeparators(qsFolder);
qsFolder = QFileDialog::getExistingDirectory(this, "Select capture folder", qsFolder);
qsFolder = QDir::toNativeSeparators(qsFolder);
To copy to clipboard, switch view to plain text mode
Any help is appreciated.
Bye
SOLVED:
Well i found the reason in the msdn:
If COM is initialized using CoInitializeEx with the COINIT_MULTITHREADED flag, SHBrowseForFolder fails if the calling application uses the BIF_USENEWUI or BIF_NEWDIALOGSTYLE flag in the BROWSEINFO structure.
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
Sorry for bothering you
Thx
Bookmarks