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

[REG 6.8.2 -> 6.8.3] QFileDialog::getOpenFilename() and friends fail under sway

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • None
    • 6.8.3
    • QPA: Wayland
    • None
    • Linux/Wayland

    Description

      In Qt 6.8.3 QFileDialog::getOpenFileName() with am application event loop fails, showing no dialog and returning. If run without an application event loop it works. This is a regression from 6.8.2 where it worked in both cases. Note this seems to be sway specific, it works on KDE, GNOME and Hyprland compositors. Trivial reproducer using pySide:

      from PySide6.QtWidgets import QApplication, QFileDialog
      from PySide6.QtCore import QTimer
      def get():
          print('calling getOpenFileName()')
          print('returned:', QFileDialog.getOpenFileName(None))app = QApplication([])if if False:
          get()
      else:
          QTimer.singleShot(100, get)
          app.exec() 

      Run the above under sway as

      XDG_CURRENT_DESKTOP=sway python test.py  

      and observer failure, no file dialog is shown. Now change If False to if True and see that the file dialog is shown, as expected. Also fails with XDG_CURRENT_DESKTOP=sway:kde

      Attachments

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

        Activity

          People

            qt.team.graphics.and.multimedia Qt Graphics Team
            kovidgoyal Kovid Goyal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes