question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pyside2 method overriding doesn't work

See original GitHub issue

0.6.13rc6 Python: 3.9.2 (default, Feb 20 2021, 18:40:11) OS: Linux Arch: x86_64

installed by pip install -U "https://github.com/Nuitka/Nuitka/archive/factory.zip", since looking for extant issues turned up a bunch related to PySide2

So far, I’ve noticed that it fails in at least 2 different places when overriding methods on Qt objects, event, paintEvent.

This is the smallest example I care to try and replicate for now.

Compiled with nuitka3 --follow-imports --enable-plugin=pyside2 test.py

from PySide2.QtWidgets import *

class CustomEvent(QDialog):
    def event(self, event):
          print("Hello")
          return super(CustomEvent,self).event(event)


app = QApplication([])
testDialog = CustomEvent()
testDialog.show()
app.exec_()

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
kayhayencommented, Mar 14, 2021

This is a duplicate I assume, as it’s working after a fix for an unpushed correction of #1022 that is coming soon. My CI is busy with a pre-release of the state you tested.

0reactions
kayhayencommented, May 25, 2021

Thanks for the feedback.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Subclass & override PySide2 widget method; where do I find ...
I've found the Qt for Python documentation to be refreshing (compared to PyQt) and lists all methods for a class with a fair...
Read more >
How to override PySide2 widget's method generated by Qt ...
I'm trying to learn PySide2 by creating a mimic executable like powerrename tool in powertoys. I created all the visible UI part in...
Read more >
Overriding methods - Not sure why this doesn't work...(SOLVED)
Answer 5193fbe3d2acd2c3b3000e45​​ drive_car should change self. condition (which is a private instance variable that is specific to the object), not Car. ...
Read more >
[Example code]-Subclass & override PySide2 widget method; where ...
When inheriting a class and overriding a method you don't always know what's inside the original class. And if I understand correctly, various...
Read more >
PySide2 Signals, Slots and Events - Python GUIs
You can intercept events by sub-classing and overriding the handler method on the class. You can choose to filter, modify, or ignore events, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found