ProjectExplorer: Avoid accidental changes on spinbox via mouse scroll

- Introduced an Utils::attachWheelBlocker() to disable mouse wheel events on the "Parallel Jobs" field.
- This prevents unintentional modifications when users inadvertently scroll over the input.

Change-Id: Iccb93305fbcf399cae683412078782b5ea9f4ad6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Tasuku Suzuki
2023-10-13 16:21:45 +09:00
parent 13f5367611
commit f1085b324e
5 changed files with 54 additions and 0 deletions

View File

@@ -18,6 +18,7 @@
#include <utils/algorithm.h>
#include <utils/fileutils.h>
#include <utils/guiutils.h>
#include <utils/layoutbuilder.h>
#include <QCheckBox>
@@ -105,6 +106,7 @@ GeneralSettingsPageWidget::GeneralSettingsPageWidget()
zoomSpinBox->setSingleStep(10);
zoomSpinBox->setValue(100);
zoomSpinBox->setSuffix(Tr::tr("%"));
attachWheelBlocker(zoomSpinBox);
antialiasCheckBox = new QCheckBox(Tr::tr("Antialias"));
auto fontGroupBox = new QGroupBox(Tr::tr("Font"));