Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
6.4.0
-
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
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
Issue Links
- duplicates
-
QTBUG-107755 Ubuntu 22.04 (Wayland) logs out after basic interaction with Qt Widgets UI
- Closed
- relates to
-
QTBUG-100148 Hover state of QCombobox has not been reset
- Closed