bylge-logo

    Bylge

    PyQt5 Kemik yapı

    Picture of the Python

    Python

    December 02, 2023

    ilk Kütüphaneler from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtGui import * import sys Sonra Kılasımız class main(QWidget): __init__

    ilk Kütüphaneler


    from PyQt5.QtWidgets import *

    from PyQt5.QtCore import *

    from PyQt5.QtGui import *

    import sys


    Sonra Kılasımız


    class main(QWidget):


    __init__ Fonksiyonumuz Ve İçi


    def __init__(self):

    super().__init__()

    self.init()


    init Fonksiyonumuz

    def init(self):


    ilk Başlık


    self.setWindowTitle("pyqt5 window")


    Sonra Layoutumuz


    self.vbox=QVBoxLayout()


    Sonra Widgetslerimiz


    self.widgets()


    Ve vbox'u Belirliyelim


    self.setLayout(self.vbox)


    Ve Gösterelim


    self.show()


    Widgets Fonksiyonumuz


    def widgets(self):

    self.vbox.addWidget(QLabel("Deneme"))


    Sonra


    if __name__ == '__main__':

    app=QApplication(sys.argv)

    main=main()

    sys.exit(app.exec())


    Ve Çıktı



    PyQt5_Kemik_yapı


    Share Your Expertise, Earn Rewards!

    Found this insightful? Imagine your knowledge generating income. Contribute your articles to bylge.com and connect with readers while unlocking your earning potential.