Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Webcam checkbox flicker & Use Checkbox::clicked signal #177

Merged
merged 2 commits into from
Jun 15, 2024

Conversation

Jiogo18
Copy link
Contributor

@Jiogo18 Jiogo18 commented Jun 12, 2024

The first commit is about the webcam checkbox. It flickers between ON and OFF when I click it.

This is because MainWindow::updateData() is called after the click, but before ecData is updated.
So the update contains the previous value.

Fixed by calling updateEcData, like in MainWindow::setCoolerBoostState

The second commit is about replacing Checkbox::toggled by Checkbox::clicked.

  • Signal CheckBox::toggled is also triggered when using setChecked, which is not what we want.
  • Signal CheckBox::clicked is triggered on user interactions only (click, touch, press space..), so I think it is more relevant.

Jiogo18 added 2 commits June 12, 2024 19:04
Signal CheckBox::toggled is also triggered when using setChecked, which is not what we want.
Signal CheckBox::clicked is tiggered on user interactions only (click, touch, press space..)
https://doc.qt.io/qt-6/qabstractbutton.html#toggled
@dmitry-s93 dmitry-s93 merged commit 9d1a328 into dmitry-s93:main Jun 15, 2024
@Jiogo18 Jiogo18 deleted the webcam branch February 24, 2025 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants