Congratulations to our 2022 Qt Champions!

[QT-BUG FOUND] KDE QFileDialog under Gnome



  • Whenever I open a QFileDialog, a KDE file dialog pops up even though I'm running Gnome.
    Is there anyway I can force Qt to use the Gnome dialog when running Gnome and only show the KDE one if I'm actually running KDE?

    I changed QFileDialog::DontUseNativeDialog, but it stays at KDE.



  • You shouldn't use QFileDialog::DontUseNativeDialog :)). The best practice will be:
    @
    QString filename = QFileDialog::getOpenFileName(this, tr("Open file"), QDir::homePath(), "All files (*)");
    @

    It will be really native to all platforms.



  • Even with your code (and not using QFileDialog::DontUseNativeDialog) I still get the KDE dialog.



  • Hmmm. It should be interesting. Can you tell me a story of your Qt, please? And are you using any styles?



  • No, I'm not using any styles.
    I'm currently linking against Qt 5.



  • It can be just Qt 5 bug. Does it work on Qt 4.8?



  • Ohh yes. It works on Qt4, so it's probably just a bug in 5.



  • You should report about it to Qt Bug Tracker.

    -And prepend to your thread's title "[QT-BUG FOUND] ".-

    edit: as explained by Tobias Hunger, the forums are not suitable for bug reporting. Please don't invent your own tags, it is not helpful; Andre



  • tucnak: Just ask them to file a bug report and tag this post with the idea and please don't send people of on fools errands like "prepend to your thread's title - [QT-BUG-FOUND]". That is no help to anybody.


Log in to reply