+ value_.setValue(value);
+
+ int best_match = list_.count() - 1;
+ int64_t best_variance = INT64_MAX;
+
+ for (int i = 0; i < list_.count(); i++) {
+ const int64_t this_variance = abs(
+ (int64_t)value - list_.itemData(i).value<int64_t>());
+ if (this_variance < best_variance) {
+ best_variance = this_variance;
+ best_match = i;
+ }
+ }