'setText does not trigger every changing value
setText value does not change every refresh value, I call this function in while loop when I press the button as a get_sensor_value("0","0"), get_sensor_value("9","9") but there is nothing show in the label area how can I fix it ?
I define the connect function like this:
self.ui.canSensorValueButton.clicked.connect(self.canbus_angle_value)
and function:
def canbus_angle_value()
...
while(True):
get_sensor_value("0","0")
...
get_sensor_value("9","9")
And get function:
def get_sensor_value(self, value1, value2):
QTimer.singleShot(3 * 1000, lambda: self.ui.xAngleValue.setText(value1))
QTimer.singleShot(3 * 1000, lambda: self.ui.yAngleValue.setText(value2))
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
