Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- # -*- coding: utf-8 -*-
- from PyQt4.QtCore import * # no error
- from PyQt4.QtGui import * # no error
- class testWidget(QWidget): # error 'undefined variable: QWidget
- def __init__(self, parent=None):
- super(testWidget, self).__init__(parent)
- if __name__ == '__main__':
- import sys
- import platform
- print('Python Version {}, Qt Version {}, PyQt Version {}, System {}'.\
- format(platform.python_version(), QT_VERSION_STR,
- PYQT_VERSION_STR, platform.system()))
- # error 'undefined variable: QT_VERSION_STR & PYQT_VERSION_STR
- app = QApplication(sys.argv) # error 'undefined variable: QApplication
- widget = testWidget()
- widget.show()
- app.exec_()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement