Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5.3, 6.7.3, 6.8.0
-
None
-
openSUSE Tumbleweed with Plasma 6 Wayland
Description
After calling hide() and then show() on QFileDialog backed by XDG desktop portal, two file chooser windows can be seen,
Here is sample code:
#include <QApplication> #include <QFileDialog> #include <QTimer> using namespace std::chrono_literals; int main(int argc, char *argv[]) { qputenv("QT_QPA_PLATFORMTHEME", "xdgdesktopportal"); QApplication a(argc, argv); QTimer::singleShot(0, [] { auto *dialog = new QFileDialog(); dialog->setAttribute(Qt::WA_DeleteOnClose); dialog->setFileMode(QFileDialog::ExistingFile); dialog->show(); QTimer::singleShot(1s, dialog, [=] { dialog->hide(); QTimer::singleShot(1s, dialog, [=] { dialog->show(); }); }); }); return a.exec(); }