Version: 4.4.0 (using KDE 4.4.0)
Compiler: gcc version 4.4.3
Installed from: Fedora RPMs
As mentioned here https://bugzilla.redhat.com/show_bug.cgi?id=570090 KDE replaces the Qt file dialog in Qt applications with the KDE file dialog.
This would be okay, but the KDE file dialog behaviour is buggy and causes quite serious usability problems in my Qt application Veusz:
- The QFileDialog::selectFilter(filt) function call (documented in Qt <= 4.3) does not appear to work. The selected filter in the dialog box remains at the first one. This function call, as far as I can see, is not deprecated.
- QFileDialog::setDirectory(somedir) does not show the contents of the directory given in the dialog, but shows the directory above. This is different to the behaviour of the standard Qt file dialog.
- The file dialog does not act quite like a normal dialog. With compositing switched on, the main application does not go dark like it does with the standard Qt file dialog. This is a minor issue, however.
I can work round the first issue using QFileDialog::setNameFilter, which appears to work, but I cannot work round the second issue.
Is there a way of switching off the KDE replacement file dialog as a workaround until this is fixed?
- The QFileDialog::selectFilter(filt)
There is no equivalent in the KFaileDialog.
I cannot reproduce the problem. Here, both QFileDialog and KFileDialog act the same. Do you have a test case?
- KWin does not dark the parent window.
That is probably a bug in KWin, the problem is maybe that the parent hierarchy is different that the one KWin usually expect.
There's definitely a problem with QFileDialog::setDirectory on my system. Here is an example program:
int main(int argc, char *argv)
QApplication app(argc, argv);
QString homedir( getenv("HOME") );
With the KDE file dialog, this shows the contents of the /home directory, selecting my home directory in that directory.
With the Qt file dialog, this shows the contents of my home directory.
I can confirm issues with QFileDialog::setDirectory() in QFileDialog::AcceptSave mode:
1. instead of the given directory, it's parent is shown
2. the given directory is selected (it's name is in the filename edit box), despite allowing only opening files, and not directories
Note that setDirectory() in the AcceptOpen mode works ok.
Me too... So, now i am checking which desktop env. is running and choosing whether to use the static methods or not based on that.
Is this still an issue with the KDE Frameworks 5.x version?
I cannot reproduce this anymore with the given test code.
Excellent, thanks for testing!