python - How to return a value from a class on pushbutton? PYQT5 -


i want return values of qlineedit , qcombobox when button clicked, i've tried sorts , can't work, way i've been able work set functions global, know isn't best practice, tips?

example of code:

self.searchbutton.clicked.connect(self.getdata) 

then:

def getdata(self):     x = self.regions.currenttext()     y = self.searchbar.text()     global x     global y 


Comments

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -