Giter Club home page Giter Club logo

Comments (5)

sccolbert avatar sccolbert commented on August 22, 2024

Sounds like a PySide bug. Can you test on PyQt and confirm?

from enaml.

blakejohnson avatar blakejohnson commented on August 22, 2024

Indeed, this does seem to work with PyQt.

from enaml.

sccolbert avatar sccolbert commented on August 22, 2024

Thanks. Marking as PySide bug.

from enaml.

kiwi0fruit avatar kiwi0fruit commented on August 22, 2024

Message box doesn't work with PySide2

Simply using message box leads to error with PySide2:

from enaml.stdlib.message_box import information
...
    triggered ::
        information(self, "Testing",
            ("If you see this then presumably PySide-Enaml bug was patched.\n" +
             "But it still can be broken if Python hangs after pressing OK.")
        )
...

Error:

Traceback (most recent call last):
  File "C:\Miniconda3\envs\enaml\lib\site-packages\enaml\qt\qt_action.py", line 79, in on_triggered
    self.declaration.triggered(checked)
  File "C:\Miniconda3\envs\enaml\lib\site-packages\enaml\core\declarative_meta.py", line 68, in declarative_change_handler
    engine.write(owner, change['name'], change)
  File "C:\Miniconda3\envs\enaml\lib\site-packages\enaml\core\expression_engine.py", line 217, in write
    pair.writer(owner, name, change)
  File "C:\Miniconda3\envs\enaml\lib\site-packages\enaml\core\standard_handlers.py", line 82, in __call__
    call_func(func, (), {}, scope)
  File "C:\PyCharmProjects\enaml_video\enaml_video_view.enaml", line 51, in f
    )
  File "C:\Miniconda3\envs\enaml\lib\site-packages\enaml\stdlib\message_box.enaml", line 148, in information
    return _exec_box(parent, title, text, buttons, 'information')
  File "C:\Miniconda3\envs\enaml\lib\site-packages\enaml\stdlib\message_box.enaml", line 305, in _exec_box
    box.set_parent(parent)
  File "C:\Miniconda3\envs\enaml\lib\site-packages\enaml\core\object.py", line 160, in set_parent
    parent.child_added(self)
  File "C:\Miniconda3\envs\enaml\lib\site-packages\enaml\widgets\toolkit_object.py", line 185, in child_added
    child.activate_proxy()
  File "C:\Miniconda3\envs\enaml\lib\site-packages\enaml\widgets\toolkit_object.py", line 210, in activate_proxy
    self.activate_top_down()
  File "C:\Miniconda3\envs\enaml\lib\site-packages\enaml\widgets\toolkit_object.py", line 226, in activate_top_down
    self.proxy.activate_top_down()
  File "C:\Miniconda3\envs\enaml\lib\site-packages\enaml\qt\qt_toolkit_object.py", line 75, in activate_top_down
    self.create_widget()
  File "C:\Miniconda3\envs\enaml\lib\site-packages\enaml\qt\qt_dialog.py", line 72, in create_widget
    self.widget = QWindowDialog(self, self.parent_widget(), flags)
  File "C:\Miniconda3\envs\enaml\lib\site-packages\enaml\qt\qt_dialog.py", line 41, in __init__
    super(QWindowDialog, self).__init__(parent, flags)
TypeError: 'PySide2.QtWidgets.QDialog' called with wrong argument types:
  PySide2.QtWidgets.QDialog(PySide2.QtWidgets.QAction, PySide2.QtCore.Qt.WindowType)
Supported signatures:
  PySide2.QtWidgets.QDialog(PySide2.QtWidgets.QWidget = nullptr, PySide2.QtCore.Qt.WindowFlags = Qt.WindowFlags())

Process finished with exit code 0

Presumably now it's worth investigations as PySide2 was added to pypi. I installed PySide2-5.11.1 from pip (pip install pyside2 + delete qt.conf if it's near python.exe).

Related issue about work arounds for this bug stopped working with PySide1. But I didn't test them with PySide2 because I'm more interested in upstream solution rather than a work around.

from enaml.

MatthieuDartiailh avatar MatthieuDartiailh commented on August 22, 2024

Indeed this is new I believe. I will try to investigate but I do not know when I will find time to do so.

from enaml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.