    auto &children = model->root->children;
    for (int i = 0; i < children.size(); ++i) {
      bool highlight = children[i]->sig == sig;
      if (std::exchange(children[i]->highlight, highlight) != highlight) {
        emit model->dataChanged(model->index(i, 0), model->index(i, 0));
      }
    }
  }
  
  void SignalView::leaveEvent(QEvent *event) {
 
</s> remove   QSize size = QStyledItemDelegate::sizeHint(option, index);
  if (index.column() == 0 && !index.parent().isValid()) {
    size.rwidth() = std::min(option.widget->size().width() / 2, size.width() + color_label_width + 8);
 </s> add   int width = option.widget->size().width() / 2;
  if (index.column() == 0) {
    auto text = index.data(Qt::DisplayRole).toString();
    auto it = width_cache.find(text);
    if (it == width_cache.end()) {
      int spacing = option.widget->style()->pixelMetric(QStyle::PM_TreeViewIndentation) + color_label_width + 8;
      it = width_cache.insert(text, option.fontMetrics.width(text) + spacing);
    }
    width = std::min(width, it.value()); </s> remove   return size;
 </s> add   return {width, QApplication::fontMetrics().height()}; </s> remove #include <QGuiApplication>
 </s> add 
      emit model->dataChanged(model->index(i, 0), model->index(i, 0), {Qt::DecorationRole});
    auto &children = model->root->children;
    for (int i = 0; i < children.size(); ++i) {
      bool highlight = children[i]->sig == sig;
      if (std::exchange(children[i]->highlight, highlight) != highlight) {
      emit model->dataChanged(model->index(i, 0), model->index(i, 0), {Qt::DecorationRole});
      }
    }
  }
  
  void SignalView::leaveEvent(QEvent *event) {
keep keep keep keep replace keep keep keep keep keep
 cabana: improve the performance of updating TreeView in real-time. (#27517) 
tools/cabana/signaledit.cc