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

Selects an item in QTreeView, press Ctrl key, the application will freezes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P1: Critical
    • None
    • 6.4.0, 6.4.1
    • Widgets: Itemviews
    • None
    • Windows 10 Pro x64 21H2 19044.2251
      Windows Feature Experience Pack 120.2212.4180.0
    • Windows

    Description

      • Repeate selects an item in QTreeView, then press Ctrl key
      • Or selects an item in QTreeView, repeate press Ctrl key
        The application will freezes
      #include <QGridLayout>
      #include <QStringListModel>
      #include <QTreeView>
      
      MainWindow::MainWindow(QWidget *parent)
          : QMainWindow(parent)
          , ui(new Ui::MainWindow)
      {
          ui->setupUi(this);
      
          auto model = new QStringListModel(this);
          QStringList list;
          list << "a" << "b" << "c"<< "a" << "b" << "c"<< "a" << "b" << "c";
          model->setStringList(list);
      
          auto tree = new QTreeView(this);
          tree->setModel(model);
      
          QGridLayout *mainLayout = new QGridLayout;
          mainLayout->setSpacing(0);
          mainLayout->setContentsMargins(0, 0, 0, 0);
          mainLayout->addWidget(tree);
          ui->centralwidget->setLayout(mainLayout);
      }
      

      Attachments

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

        Activity

          People

            vhilshei Volker Hilsheimer
            haisea Jay Chen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes