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 report: 8.0.0 pyqt6 test_add_to_menu fails #1250

Open
opoplawski opened this issue Jun 12, 2023 · 1 comment
Open

Bug report: 8.0.0 pyqt6 test_add_to_menu fails #1250

opoplawski opened this issue Jun 12, 2023 · 1 comment

Comments

@opoplawski
Copy link
Contributor

Environment

OS: Linux
Python version: 3.11
Toolkit: Qt
Qt API: PyQt6

Description

ERROR: test_add_to_menu (pyface.action.tests.test_action_item.TestActionItem.test_add_to_menu)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-pyface-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/pyface/action/tests/test_action_item.py", line 100, in test_add_to_menu
    action_item.add_to_menu(window.control, menu, None)
  File "/home/orion/BUILDROOT/python-pyface-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/pyface/action/action_item.py", line 100, in add_to_menu
    wrapper = _MenuItem(parent, menu, self, controller)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-pyface-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/pyface/ui/qt/action/action_item.py", line 82, in __init__
    self.control = menu.addAction(
                   ^^^^^^^^^^^^^^^
TypeError: arguments did not match any overloaded call:
  addAction(self, icon: QIcon, text: str): argument 1 has unexpected type 'str'
  addAction(self, icon: QIcon, text: str, slot: PYQT_SLOT, type: Qt.ConnectionType = Qt.AutoConnection): argument 1 has unexpected type 'str'
  addAction(self, icon: QIcon, text: str, shortcut: Union[QKeySequence, QKeySequence.StandardKey, str, int]): argument 1 has unexpected type 'str'
  addAction(self, icon: QIcon, text: str, shortcut: Union[QKeySequence, QKeySequence.StandardKey, str, int], slot: PYQT_SLOT, type: Qt.ConnectionType = Qt.AutoConnection): argument 1 has unexpected type 'str'
  addAction(self, text: str): too many arguments
  addAction(self, text: str, shortcut: Union[QKeySequence, QKeySequence.StandardKey, str, int]): argument 2 has unexpected type 'method'
  addAction(self, text: str, slot: PYQT_SLOT, type: Qt.ConnectionType = Qt.AutoConnection): argument 3 has unexpected type 'str'
  addAction(self, text: str, shortcut: Union[QKeySequence, QKeySequence.StandardKey, str, int], slot: PYQT_SLOT, type: Qt.ConnectionType = Qt.AutoConnection): argument 2 has unexpected type 'method'
  addAction(self, action: QAction): argument 1 has unexpected type 'str'

Steps to Reproduce

+ QT_API=pyqt6
+ case $toolkit in
+ export ETS_TOOLKIT=qt
+ ETS_TOOLKIT=qt
+ export EXCLUDE_TESTS=wx
+ EXCLUDE_TESTS=wx
+ fail=0
+ xvfb-run /usr/bin/python3 -Xfaulthandler -s -m unittest discover -v -f pyface
@corranwebster
Copy link
Contributor

Thanks for the report - PyQt6 is not yet supported, although this issue is one I haven't seen before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants