title: QTreeWidget editItem fails with "edit: editing failed"
body: <p>I have a <code>QTreeWidgetItem</code> added to a <code>QTreeWidget</code>:</p>
  
  <pre><code>QTreeWidgetItem* item = new QTreeWidgetItem(ui-&gt;trwPairs);
  item-&gt;setFlags(item-&gt;flags() | Qt::ItemIsEditable);
  </code></pre>
  
  <p>If the item is edited, I want to do a few checks on the new value:</p>
  
  <pre><code>Pairs::Pairs(QWidget *parent) :
  QWidget(parent),
    ui(new Ui::Pairs)
  {
    ui-&gt;setupUi(this);
    connect(this-&gt;ui-&gt;trwPairs, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(Validate(QTreeWidgetItem*,int)));
  }
  
  void Pairs::Validate(QTreeWidgetItem* item, int column)
  {
    if (item-&gt;text(column).toInt() &lt; 1)
    {
      QMessageBox::critical(this, "Error", QString("Node ID ") + item-&gt;text(column) +  " is invalid.");
      ui-&gt;trwPairs-&gt;editItem(item, column);
    }
  }
  </code></pre>
  
  <p>Naturally, if it's less than 1, it catches it, and gives me the message box. However, printed to <code>cerr</code> is <code>edit: editing failed</code> and the item is not in edit mode. What am I missing?</p>