title: Using Qt::UserRole and Qt::DisplayRole for Items in QComboBox
body: <p>I am new to C++ Qt. I am trying to populate a QComboBox with values different than the values that need to be used.
  For example, QComboBox shows name of devices but on selection sends the mac address of that device. I have the data.</p>
  
  <p>I tried using Qt::UserRole and Qt::DisplayRole but only the values mentioned in DisplayRole are used. I think I need to define the roles? If yes, then how? Any help regarding this?</p>
  
  <pre><code>QStandardItemModel *model = new QStandardItemModel(this);
  int i = 0;
  for (auto info : list)
  {
      if (info.validateMACAddress())
      {
          memData-&gt;comboBox-&gt;addItem(info.getMacAddress().arg(i));
          memData-&gt;comboBox-&gt;setItemData(i, info.getDeviceName(), Qt::DisplayRole);
          memData-&gt;comboBox-&gt;setItemData(i, info.getMacAddress(), Qt::UserRole + 1);
          i++;
      }
  }
  memData-&gt;comboBox-&gt;setModel(model);
  </code></pre>