#1071943 QFileDialog: Non-Native dialog is very slow, regressions again.

Package:
libqt6widgets6t64
Source:
libqt6widgets6t64
Description:
Qt 6 widgets module
Submitter:
Kyuma Ohta
Date:
2024-06-23 06:06:15 UTC
Severity:
normal
#1071943#5
Date:
2024-05-26 10:01:07 UTC
From:
To:
Dear Maintainer,

 I wrote program QFileDialog to select file(s).
 With non-native dialog (Qt owned, not Desktop-Environment's), this is very slow.
 This widget eats a lot of CPU time usage at creating , also move to some directories.
--- Sample ---
#include <QFileDialog>

void foo::open_dialog(QString& _dir, QStringList& _filter_list)
{
    QFileDialog* dlg = new QFileDialog(nullptr);

    dlg->setAttribute(Qt::WA_DeleteOnClose, true);
    dlg->setOption(QFileDialog::ReadOnly, (is_save) ? false : true);
    dlg->setOption(QFileDialog::DontUseCustomDirectoryIcons, true);
    dlg->setAcceptMode(QFileDialog::AcceptOpen);
    dlg->setFileMode(QFileDialog::ExistingFile);

    // [1]
    dlg->setOption(QFileDialog::DontUseNativeDialog, true);

    // [2]
    //dlg->setViewMode(QFileDialog::Detail);
    dlg->setViewMode(QFileDialog::List);

    // Below connection is sample.Any slots may exist.
    connect(dlg, SIGNAL(fileSelected(QString)), this, SLOT(read_file(QString)));
    connect(dlg, SIGNAL(finished(int)), this, SLOT(finished_dialog_slot(int)));
    connect(dlg, SIGNAL(destroyed()), this, SLOT(close_dialog_slot()));

    dlg->setDirectory(_dir);
    dlg->setNameFilters(_filter_list);

    dlg->setModal(false);

    dlg->open();
}
--- END SAMPLE --- This regression don't happen with Qt 5.x, at least 5.15. # I forgot for older minor version, i.e. 5.6 ... But, with Qt 6.x (also 6.2! not only 6.4!), this regression always happenes. [1] When this option set to false, use theme's file-selector (i.e. Gtk, Mate, XDG...). [2] Set with both List and Detail, seems to be no difference. Best regards, Kyuma Ohta. *** Reporter, please consider answering these questions, where appropriate *** * What led up to the situation? * What exactly did you do (or not do) that was effective (or ineffective)? * What was the outcome of this action? * What outcome did you expect instead? *** End of the template - remove these template lines ***
#1071943#10
Date:
2024-05-30 15:29:27 UTC
From:
To:
I research this issue when reproduce, more.

Now, I found below (with MATE desktop environment)
results of different by environment variables.

A. Not setting something by hand
(excepts QT_QPA_PLATFORMTHEME has already set to gtk3 etc..)
-> This issue is reproducable.

B. Setting QT_QPA_PLATFORMTHEME=gtk3 or xdgdesktopportal
-> Isn't reproducable.

C. Setting XDG_CURRENT_DESKTOP=KDE and
   *unset* QT_QPA_PLATFORMTHEME
-> ISN'T REPRODUCABLE, this regression don't make.

D. Setting XDG_CURRENT_DESKTOP=KDE and
   *set*  QT_QPA_PLATFORMTHEME to anything(maybe..)
-> This also be reproduce.

Best regards,
Ohta.

#1071943#15
Date:
2024-05-30 15:57:42 UTC
From:
To:
Sorry, I missed below part of previous report.

This is wrong, I missed.
Situation of B. , make *reproducable* this regression.

Sorry...
Ohta.

On Fri, 31 May 2024 00:29:27 +0900 "K.Ohta" <whatisthis.sowhat@gmail.com> wrote: