I have a problem with a simple program. I open QFileDialog as follows:
QFileDialog fileDialog(this); fileDialog.setAcceptMode(QFileDialog::AcceptOpen); if (!fileDialog.exec()) return;
However, it shows the Qt dialog box instead of the native Windows dialog box. I use Windows 7 x64, and I really prefer my own dialogue instead of Qt dialogue, because it is a bit more attractive. However, I read, and I found that this can be changed using:
fileDialog.setOption(QFileDialog::DontUseNativeDialog, false);
The fact is that I do not get the native Windows dialog, and Qt is one, so this option does not work ... Does anyone know how to solve this problem without using static members?
I do not want to use static elements because they have a memory leak problem or something like that, because if you open several new dialogs with a static member, the memory used by your program will increase and increase, however, using the dialogue previously saved with a pointer does not have this problem.
So, if someone has an answer about these two things (a problem with the internal dialogue and a problem with a memory leak), tell me.
Thanks.
qt qfiledialog
daleotar
source share