Home > other >  How to use pyqt5 timer
How to use pyqt5 timer

Time:10-08

I python small white, as needed, in a written in PYQT interface, interface has a button, click the button to refresh the interface,
Now want to set the timer automatically refresh interface, but the timer function name has been written is wrong,

Want to call draw_line function, the timer? What place should write, who taught,

The code is as follows:
The class Ui_MainWindow_pro (object) :
Def setupUi (self, the MainWindow) :
Initial setup code # interface

The class mw_pro (QMainWindow Ui_MainWindow_pro) :
Def __init__ (self, parent=None) :
Super (mw_pro, self) __init__ (parent)
Pass
Def fit_curve (self) :
Self. Label_id_V. Text ()
Def draw_line (self) :
Self. Fit_curve ()

The timer=threading. The timer (10?)

CodePudding user response:

Instantiate the class and they belong to. Kind of subordinate function method?

CodePudding user response:

reference 1st floor iam_ylw response:
class and instantiation. Kind of subordinate function method?

Was thinking at the beginning, but the program error: no label_id_V mw_pro this attribute
  • Related