from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
import sys
class deneme(QWidget):
    def __init__(self):
        super().__init__()
        self.buton = QPushButton("Bas",self)
        
if __name__ == "__main__":
    application = QApplication(sys.argv)
    pencere = deneme()
    pencere.show()
    sys.exit(application.exec_())
merhaba böyle bir kodum var çalıştırmada herhangı bir sorun yok ama yeni bir def açıp kodu yazdığım zaman çalışmıyor bunun sebebı nedir.
veri(self):
    self.buton = QPushButton("Bas",self)
örnek olarak bu şekilde yapınca çalışmıyor