Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Create Python buttons in 7 minutes! ๐Ÿ›Ž๏ธ
Play lesson

Python tutorial for beginners ๐Ÿ - Create Python buttons in 7 minutes! ๐Ÿ›Ž๏ธ

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 #Python PushButtons import sys from PyQt5.QtWidgets import QMainWindow, QApplication, QPushButton, QLabel class MainWindow(QMainWindow): def __init__(self): super().__init__() self.setGeometry(700, 300, 500, 500) self.button = QPushButton("Click me!", self) self.initUI() def initUI(self): self.button.setGeometry(150, 200, 200, 100) self.button.setStyleSheet("font-size: 30px;") self.button.clicked.connect(self.on_click) def on_click(self): print("Button clicked!") 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