diff options
Diffstat (limited to 'Lib/defconQt/windows/test.py')
| -rw-r--r-- | Lib/defconQt/windows/test.py | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/Lib/defconQt/windows/test.py b/Lib/defconQt/windows/test.py deleted file mode 100644 index e9be55c..0000000 --- a/Lib/defconQt/windows/test.py +++ /dev/null @@ -1,45 +0,0 @@ -from PyQt5.QtCore import * -from PyQt5.QtWidgets import * - -class Form(QWidget): - def __init__(self, parent=None): - super(Form, self).__init__(parent) - - nameLabel = QLabel("Name:") - self.nameLine = QLineEdit() - self.submitButton = QPushButton("&Submit") - - buttonLayout1 = QVBoxLayout() - buttonLayout1.addWidget(nameLabel) - buttonLayout1.addWidget(self.nameLine) - buttonLayout1.addWidget(self.submitButton) - - self.submitButton.clicked.connect(self.submitContact) - - mainLayout = QGridLayout() - # mainLayout.addWidget(nameLabel, 0, 0) - mainLayout.addLayout(buttonLayout1, 0, 1) - - self.setLayout(mainLayout) - self.setWindowTitle("Hello Qt") - - def submitContact(self): - name = self.nameLine.text() - - if name == "": - QMessageBox.information(self, "Empty Field", - "Please enter a name and address.") - return - else: - QMessageBox.information(self, "Success!", - "Hello %s!" % name) - -if __name__ == '__main__': - import sys - - app = QApplication(sys.argv) - - screen = Form() - screen.show() - - sys.exit(app.exec_())
\ No newline at end of file |
