0

I am trying to get a QSpinBox to only send the new value when it changes from focused to unfocused so that it doesn't send an update every time a user changes a digit.

Currently it looks like this

self.specificBox.valueChanged.connect(self.setspecificValue)

I tried to change it to

self.specificBox.editingFinished.connect(self.setspecificValue)

but that didn't work

Any idea how to fix this?

3
  • 2
    Can you please show what you have done so far? Because the editingFinished signal is exactly what you are looking for and should work as intended. Commented May 8, 2020 at 15:18
  • change to self.specificBox.editingFinished.connect(lambda: self.setspecificValue(self.specificBox.value())) Commented May 8, 2020 at 15:43
  • @eyllanesc, thanks a lot, that worked just fine. Could you explain the difference please? Commented May 12, 2020 at 10:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.