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

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -