How to send a signal from delegate
<p>I have an user interface that uses a TableView. It has 3 columns. The last column has a comboBox. All the data is inserted with the delegate. The problem is I can not find a method to send a signal to a public slot of the user interface class when the combobox index is changed.
    With the delegate I already know the current index. Do someone know a method to send this index to the ui? I do not think the only possible solution is with signals and slots. Is a direct solution to extract this data?</p>

<p><strong>EDIT</strong></p>

<p>What I understand it is I have to do something like this:</p>

<pre><code>void Delegate :: setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &amp;index) const
{
 if(index.column() == COL_Coordonate) // test if we are at the last column
   {
        QComboBox *comboBox = static_cast&lt;QComboBox*&gt;(editor);
        model -&gt; setData(index, comboBox -&gt; currentIndex(), Qt::EditRole);
        emit dataChanged(comboBox -&gt; currentIndex(),comboBox -&gt; currentIndex()); // something like this you have in mind?
   }

}
</code></pre>

<p>And how can I receive that index in the user interface? I create my model in there something like:</p>

<pre><code>QStandardItemModel *model;
Delegate *mydelegate;
</code></pre>

<p>And use them like:</p>

<pre><code>mydelegate = new Delegate(this);
model = new QStandardItemModel(0, 3, this); // I add rows dynamically
ui -&gt; tableView -&gt; setModel(model);
ui -&gt; tableView -&gt; setItemDelegate (mydelegate);
</code></pre>

<p>I add data with the delegate when I press a button. Do I need do trigger a slot from this interface? If so someone can please provide a sample of code about how do I do this?</p>