Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-86105

Can't get native dialogs using QfileDialog on KDE (Kubuntu 20.04)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 5.9.9, 5.12.5, 5.12.9, 5.13.2, 5.14.2, 5.15.0
    • None
    • Linux/X11

    Description

      Can't make any code (mine or official Qt examples) to use native dialogs. I'm working with Qt 5.14.2.

      Not sure if it is related to Plasma.

      I take any workaround, if there's any, as it is blocking my Kubuntu users (usb keys or network devices not showing as shortcuts in non-native dialog)

       

      #include <QApplication>
      #include <QFileDialog>
      
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
          
          QFileDialog::getOpenFileName();
      
          return app.exec();
      }
      
      
      /******************** the same dialog is showing with the following examples
      #include <QApplication>
      #include <QFileDialog>
      
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
      
          QFileDialog dialog;
          dialog.setOption(QFileDialog::DontUseNativeDialog, false);
          dialog.exec();
      
          return app.exec();
      }
      
      
      #include <QApplication>
      #include <QFileDialog>
      
      int main(int argc, char *argv[]) 
      {
          QApplication app(argc, argv);
      
          QFileDialog dialog;
          dialog.setOption(QFileDialog::DontUseNativeDialog, true); 
          dialog.exec();
      
          return app.exec(); 
      }

       

       


       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            liaqi Liang Qi
            kamui kamui
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes