Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Python PyQt5 IMAGES are easy! ๐Ÿ“ท
Play lesson

Python tutorial for beginners ๐Ÿ - Python PyQt5 IMAGES 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 #pyqt5 # PyQt5 images import sys from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel from PyQt5.QtGui import QPixmap class MainWindow(QMainWindow): def __init__(self): super().__init__() self.setGeometry(700, 300, 500, 500) label = QLabel(self) label.setGeometry(0, 0, 500, 500) pixmap = QPixmap("profile_pic.jpg") label.setPixmap(pixmap) label.setScaledContents(True) label.setGeometry((self.width() - label.width()) // 2, (self.height() - label.height()) // 2, label.width(), label.height()) def main(): app = QApplication(sys.argv) window = MainWindow() window.show() sys.exit(app.exec_()) if __name__ == "__main__": main()

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