[PyKDE] Bug with QScrollView viewport binding
Giovanni Bajo
rasky at develer.com
Wed Jun 29 13:56:20 BST 2005
Hello,
-------------------------------
from qt import *
app = QApplication([])
sv = QScrollView(None)
w = QWidget(sv.viewport())
print sv.viewport() is w.parent()
print sv.viewport(), w.parent()
print sv.viewport().width()
print w.parent().width()
-------------------------------
This outputs:
True
<qt.QWidget object at 0x00813690>
<qt.QObject object at 0x00813690>
949
Traceback (most recent call last):
File "D:\Work\caligola3d\src\pyqtbug3.py", line 14, in ?
print w.parent().width()
AttributeError: width
Notice that there are two different Python-side objects for the same C++
reference.
--
Giovanni Bajo
More information about the PyQt
mailing list