Phil Thompson <[EMAIL PROTECTED]> wrote:

> Yes - but they aren't in existence at the same time.
> [...]
> Using a temporary name to keep a reference to sv.viewport() solves the
> problem.

Then you have the inverse problem:

----------------------------------------------
from qt import *

app = QApplication([])
sv = QScrollView(None)
w = QWidget(sv.viewport())

p = w.parent()
print sv.viewport().width()
----------------------------------------------
Traceback (most recent call last):
  File "D:\Work\caligola3d\src\pyqtbug3.py", line 9, in ?
    print sv.viewport().width()
AttributeError: width

which is wrong because viewport() is supposed to return a QWidget pointer.

[Yes, the type of that widget is an internal Qt's class]
-- 
Giovanni Bajo

_______________________________________________
PyKDE mailing list    [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to