tubeshowcase●1,194,391 videos♡ My collection 0
← Learn to Code

Learn to Code06:06

Python PyQt5 IMAGES are easy! 📷

Bro Code ↗

From the creator

#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()

Published 2024-07-25 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code