Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-26838

QTreeWidget: "edit: editing failed"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P4: Low
    • Resolution: Unresolved
    • Affects Version/s: 4.8.2, 5.0.0
    • Fix Version/s: None
    • Component/s: Widgets: Itemviews
    • Labels:
      None
    • Environment:
      Windows 7 32bit, Qt 4.8.2, mingw

      Description

      Steps to reproduce:

      1) create a form with QTreeWidget and a push button
      2) connect a push button's signal "clicked()" to a slot
      3) in a slot create a new QTreeWidgetItem, add it to the view and start editing.
      4) Compile and run
      5) Start clicking on a push button quickly

      Result:

      Sometimes I see "edit: editing failed" in stderr, and the new item doesn't open the editor. Code:

      void Test::slotAdd()
      {
          QTreeWidgetItem *i = new QTreeWidgetItem(ui->tree, QStringList() << "Name" << "Data");
          i->setFlags(i->flags() | Qt::ItemIsEditable);
      
          ui->tree->addTopLevelItem(i);
          ui->tree->setCurrentItem(i, QItemSelectionModel::ClearAndSelect);
          ui->tree->editItem(i);
      }
      

      Test project is attached.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            dmitry64 Dmitry
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes