Hi can anyone help me for this problem AttributeError: 'NoneType' object has no attribute 'clicked'
my code is :
import sys
from PyQt5.QtWidgets import *
class Window(QWidget):
def __init__(self):
super().__init__()
self.setGeometry(500,250,300,400)
self.setWindowTitle("SMURF")
self.UI()
self.show()
def UI(self):
self.text=QLabel("hi bitxg",self).move(150,100)
b1=QPushButton("B1",self).move(130,120)
b2=QPushButton("B2",self).move(170,120)
b1.clicked.connect(self.b1f)
b2.clicked.connect(self.b2f)
def b1f(self):
self.text.setText("FIRST")
def b2f(self):
self.text.setText("SECOND")
App=QApplication(sys.argv)
window=Window()
sys.exit(App.exec_())