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 399 - QWidget has no method 'winId'
: QWidget has no method 'winId'
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: PySide
: 0.4.1
: All MS Windows XP/Vista/7
: P3 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2010-10-04 08:59 EEST by Matti Airas
Modified: 2010-11-25 17:48 EET (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matti Airas 2010-10-04 08:59:19 EEST
From Stefan <pyside at damp.homeip.net>:

  Hi,

I downloaded PySide 4.1 and replaced my PyQt4 imports with PySide. I 
stumbled upon two problems.

1. I use the following code in PyQt4 for QTreeWidgetItemIterator:

iter = QtGui.QTreeWidgetItemIterator(widget)
while(iter.value()):
     item = iter.value()
     ...
     iter += 1

PySide gives me the following exception:
AttributeError: 'PySide.QtGui.QTreeWidgetItemIterator' object has no 
attribute 'value'

Am I doing it the wrong way or isn't this supported yet?

2. I have a custom widget defined like this:

from PySide import QtGui, QtCore

class ViewportWidget(QtGui.QWidget):
     def __init__(self, parent=None):
         QtGui.QWidget.__init__(self, parent)
         self.setAttribute(QtCore.Qt.WA_NativeWindow, True)
         self.setAttribute(QtCore.Qt.WA_PaintOnScreen, True)

     def paintEngine(self):
         return None

I use QWidet::winId() to get the window handle and initialize directx on 
that window. This works great in PyQt4, but PySide tells me that:

AttributeError: 'ViewportWidget' object has no attribute 'winId'

The docs seem to state that winId() should indeed work:
http://www.pyside.org/docs/pyside/PySide/QtGui/QWidget.html#PySide.QtGui.QWidget.winId

/Stefan
Comment 1 Matti Airas 2010-10-04 09:03:12 EEST
OOPS.

Please regard this bug concern only issue nr 2 (the one mentioned in the bug
title). I'll file a separate bug against issue nr 1.
Comment 2 renato filho 2010-10-15 14:24:38 EEST
fixe on PySide commit:

commit 5c9afb798ecc9ec29622464c9c96909a2e79f220
Author: renatofilho <renato.filho@openbossa.org>
Date:   Thu Oct 14 16:32:29 2010 -0300
Comment 3 renato filho 2010-11-25 17:48:11 EET
released on 1.0.0~beta1