I have a problem with QFileDialog in a software that my friend and I are developing.
The software is a CAD programmed in C++/Qt(5.6) , so it uses a lot the MVC design pattern. The problem is the following :
We use QFileDialog when we are about to load or save a project.
-When we start the software and we first load the project, everything works fine
-When we try to load again, the QFileDialog doesn't display well. It does not seem frozen, the only displayed part (folders part, on the left) responds but does not display any file on the center.
The only difference I see is that after the first load, QGraphicsItem are created and updated in order to display the parts of the loaded project. Do you know what could be the problem ?
EDIT - The Code
QFileDialog fileDialog(0,tr("Load Project"), "./..", tr("CAD files (*.json)"));
fileDialog.setAcceptMode(QFileDialog::AcceptOpen);
fileDialog.setFileMode(QFileDialog::ExistingFiles);
if (QDialog::Accepted != fileDialog.exec())
return NULL;
QStringList sel = fileDialog.selectedFiles();
EDIT 2 - A working solution By forcing Qt not to use the native dialog we can display a window correctly.
fileDialog.setOption(QFileDialog::DontUseNativeDialog,true);
We are on Linux Mint 17.2, with cinnamon. Did you know any conflict between Qt and Cinnamon ?