Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Python PyQt5 LINE EDITS are easy! ๐Ÿ’ฌ
Play lesson

Python tutorial for beginners ๐Ÿ - Python PyQt5 LINE EDITS are easy! ๐Ÿ’ฌ

4.0 (0)
8 learners

What you'll learn

This course includes

  • 14.3 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

#pythontutorial #python #pythonprogramming # PyQt5 LineEdit widget from PyQt5.QtWidgets import QApplication, QMainWindow, QLineEdit, QPushButton class MainWindow(QMainWindow): def __init__(self): super().__init__() self.setGeometry(700, 300, 500, 500) self.line_edit = QLineEdit(self) self.button = QPushButton("Submit", self) self.initUI() def initUI(self): self.line_edit.setGeometry(10, 10, 200, 40) self.button.setGeometry(210, 10, 100, 40) self.line_edit.setStyleSheet("font-size: 25px;" "font-family: Arial") self.button.setStyleSheet("font-size: 25px;" "font-family: Arial") self.line_edit.setPlaceholderText("Enter your name") self.button.clicked.connect(self.submit) def submit(self): text = self.line_edit.text() print(f"Hello {text}") if ___name___ == '__main__': app = QApplication(sys.argv) window = MainWindow() window.show() sys.exit(app.exec_())

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere