PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 1019 - Overriding QWidget.show or QWidget.hide do not work
: Overriding QWidget.show or QWidget.hide do not work
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtGui
: 1.0.7
: PC All
: P3 normal
Assigned To: Hugo Parente Lima
:
:
:
  Show dependency treegraph
 
Reported: 2011-10-08 16:23 EEST by Pierre Raybaut
Modified: 2011-10-21 03:27 EEST (History)
10 users (show)

See Also:


Attachments
Test case (515 bytes, text/x-python)
2011-10-19 18:39 EEST, bbreslauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Raybaut 2011-10-08 16:23:33 EEST
When writing a widget simply derived from QWidget, the overriden `show` or
`hide` methods are never called, QWidget.show or QWidget.hide are called
instead:
http://code.google.com/p/spyderlib/source/browse/spyderlib/widgets/findreplace.py#195

Project: Spyder
PySide v1.0.7
OS: bug reproduced on both Windows (XP) and Linux (Ubuntu 10.04)

-Pierre
Comment 1 anatoly techtonik 2011-10-11 11:05:58 EEST
Spyder Bug reference: http://code.google.com/p/spyderlib/issues/detail?id=793
Comment 2 bbreslauer 2011-10-19 18:39:29 EEST
Created attachment 435 [details]
Test case
Comment 3 bbreslauer 2011-10-19 18:42:58 EEST
I just attached a test case which demonstrates that this happens only when
calling show and hide as a slot, not as a regular method. So when you run the
code, the following is printed upon start:

overriding QWidget.show
overriding QWidget.hide
overriding QWidget.show

But if you press the Show and Hide buttons, nothing further is printed.

I'm using PySide 1.0.6 on Linux, so this is around in at least two versions.
Comment 4 Hugo Parente Lima 2011-10-20 22:12:36 EEST
Fixed in commit:

pyside/5b51ad909f2b61449290c7cd984d4e580defd340
Comment 5 Hugo Parente Lima 2011-10-20 22:53:48 EEST
Released on 1.0.8.
Comment 6 anatoly techtonik 2011-10-21 03:27:13 EEST
Works like a charm now. Thanks.