[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyKDE] how to pass Qt.WFlags?
From: Gerard Vermeulen <gerard.vermeulen () grenoble ! cnrs ! fr>
Date: 2006-03-12 21:52:57
Message-ID: 20060312225257.32339d6a.gerard.vermeulen () grenoble ! cnrs ! fr
[Download RAW message or body]
Phil,
this program:
#!/usr/bin/env python
import sys
import PyQt4.Qt as Qt
class MyMainWindow(Qt.QMainWindow):
def __init__(self):
print type(Qt.Qt.WA_QuitOnClose)
# this type must be an alias for a WFlags, isn't it??
Qt.QMainWindow.__init__(self, None, Qt.Qt.WA_QuitOnClose)
if __name__ == '__main__':
app = Qt.QApplication(sys.argv)
demo = MyMainWindow()
demo.show()
raises this exception:
$ python bug.py
<class 'PyQt4.QtCore.WidgetAttribute'>
Traceback (most recent call last):
File "bug.py", line 14, in ?
demo = MyMainWindow()
File "bug.py", line 10, in __init__
Qt.QMainWindow.__init__(self, None, Qt.Qt.WA_QuitOnClose)
TypeError: argument 2 of QMainWindow() has an invalid type
Am I doing something wrong?
Gerard
_______________________________________________
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