Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Internal C++ object (ComboBoxMenu) already deleted #1015

Open
ok-oldking opened this issue Nov 24, 2024 · 0 comments
Open

[Bug]: Internal C++ object (ComboBoxMenu) already deleted #1015

ok-oldking opened this issue Nov 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ok-oldking
Copy link

ok-oldking commented Nov 24, 2024

What happened?

Internal C++ object (ComboBoxMenu) already deleted
报错, 会导致子窗口退出

Operation System

Windows 23H2

Python Version

3.12

PyQt/PySide Version

PySide6 6.8.0.2

PyQt/PySide-Fluent-Widgets Version

pySide6-Fluent-Widgets-1.7.1

How to Reproduce?

对着ComboBox狂点, 大概点个几次到十几次就会复现. 有时候点第一次就会出现
如果换回用Qt的ComboBox则不会出现

我控件是是放在一个FramelessWindow里面的, 是在弹出的一个子窗口. 可能跟这个有关系
父窗口的使用的MSFluentWindow则不会有问题

Minimum code

        self.skill_combo_box = ComboBox()
        self.skill_options = ["a","b","c"]

        self.skill_combo_box.addItems(self.skill_options)
        self.skill_combo_box.currentIndexChanged.connect(self.on_index_changed)
Error calling Python override of QPushButton::mouseReleaseEvent(): 2024-11-24 20:01:02,949 ERROR MainThread Uncaught exception: Traceback (most recent call last):
  File "D:\projects\sanmou\.venv\Lib\site-packages\qfluentwidgets\components\widgets\combo_box.py", line 407, in mouseReleaseEvent
    self._toggleComboMenu()
  File "D:\projects\sanmou\.venv\Lib\site-packages\qfluentwidgets\components\widgets\combo_box.py", line 346, in _toggleComboMenu
    self._showComboMenu()
  File "D:\projects\sanmou\.venv\Lib\site-packages\qfluentwidgets\components\widgets\combo_box.py", line 309, in _showComboMenu
    menu.addAction(QAction(item.icon, item.text))
  File "D:\projects\sanmou\.venv\Lib\site-packages\qfluentwidgets\components\widgets\menu.py", line 375, in addAction
    item = self._createActionItem(action)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\projects\sanmou\.venv\Lib\site-packages\qfluentwidgets\components\widgets\menu.py", line 414, in _createActionItem
    super().addAction(action)
RuntimeError: Internal C++ object (ComboBoxMenu) already deleted.
@ok-oldking ok-oldking added the bug Something isn't working label Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant