[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyKDE] Bug with QScrollView viewport binding
From:       "Giovanni Bajo" <rasky () develer ! com>
Date:       2005-06-29 12:56:20
Message-ID: 01ee01c57ca9$f1fa09e0$bf03030a () trilan
[Download RAW message or body]

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

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic