Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2114

Wayland: Application crash during QComboBox item selection

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 6.4.0
    • PySide
    • None
    • Python 3.10
      Visual Studio Code - version 1.73.0
      OS: Linux x64 5.15.0-52-generic (Ubuntu 22.04.1 LTS 64-bit )
      GNOME-Version 42.4
    • Linux/Wayland

    Description

      I'm experiencing a weird behavior when using PySide's QComboBox, when the user makes a selection from the drop-down menu.

      Steps to reproduce:

      • After starting the app, open the combo box drop-down menu
      • highlight one item by hovering the cursor above it
      • move the cursor away (the item still being highlighted)
      • click somewhere within the application window.

      Minimal example:

      import sys
      from PySide6.QtWidgets import QApplication, QWidget, QComboBox, QLabel, QMainWindow, QGridLayout
      
      class Widget(QWidget):
          def __init__(self) -> None:
              super().__init__()
              self._layout=QGridLayout()
              self.lbl = QLabel("Choose item:")
              self.cmbbox=QComboBox()
              self.cmbbox.addItem("item1")
              self.cmbbox.addItem("item2")
              self._layout.addWidget(self.lbl,1,1)
              self._layout.addWidget(self.cmbbox,1,2)
              self.setLayout(self._layout)
      
      class MainWindow(QMainWindow):
          def __init__(self):
              super().__init__()
              self._widget=Widget() 
              self.setCentralWidget(self._widget)
      
      if __name__=="__main__":
          app = QApplication(sys.argv)
          mw = MainWindow()
          mw.show()
          app.exec()
      

      After starting the app, open the combo box drop-down menu, highlight one item by hovering the cursor above it, then move the cursor away (the item still being highlighted), then click somewhere within the application window.

      Expected behavior: the drop-down menu closes without user having made a selection.

      Actual behavior: application (GNOME?) crashes.

      Attachments

        1. main.py
          0.8 kB
          Frederic Schiltz

        Issue Links

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

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              mrgoodbytes Frederic Schiltz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes