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 1083 - winId returns a PyCObject making it impossible to compare two winIds
: winId returns a PyCObject making it impossible to compare two winIds
Status: REOPENED
Product: PySide
Classification: Unclassified
Component: QtGui
: HEAD
: PC MS Windows XP/Vista/7
: P3 normal
Assigned To: Hugo Parente Lima
:
:
:
  Show dependency treegraph
 
Reported: 2011-12-03 11:12 EET by Farsmo
Modified: 2012-03-08 16:57 EET (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Farsmo 2011-12-03 11:12:54 EET
The following program prints True and False but it should print True and True.
Platform : PySide 1.0.9 on Windows.


from PySide.QtGui import *

app = QApplication([])
w = QLabel("hello world")
w.show()
print hash(w.winId())==hash(w.winId())
print w.winId()==w.winId()
app.exec_()
Comment 1 Hugo Parente Lima 2011-12-09 15:35:16 EET
On windows winId() returns a pointer, so we return what Python offer to store C
pointers.

On the other hand PyCObjects aren't useful at all, so I think is better to cast
the C pointer to a Python LongLong.
Comment 2 Hugo Parente Lima 2011-12-09 16:34:38 EET
Fixed in commit:

pyside/4f9fde566df0704083dba3d399cdfb9c85881f25

Now winId returns a long in all platforms.
Comment 3 Daniele Esposti 2012-01-25 17:28:22 EET
Using Windows binaries 1.1.0 for python 2.7 winId() method still returns a
PyCObject instead of an int
Comment 4 dustin.bensing 2012-03-03 21:15:38 EET
Same here, still present in 1.1.0. Am not able to build pyside myself. is there
any workaround to get the id as long value from the PyCObject? Any chance of
getting this "fixed" in the nex release?
Comment 5 Matti Airas 2012-03-08 16:57:33 EET
PySide is now a Qt-addon and uses Qt Project's JIRA tool for tracking bugs.
Please verify that the bug is still valid and re-submit it in the address
below:

https://bugreports.qt-project.org/

Sorry for the inconvenience!