Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Why QTreeView only expands on doubleclicks on some of the columns?



  • I have QTreeView with data supplied with QItemSelectionModel with 2 columns.
    These were called from the tree constructor:
    setSelectionBehavior(QAbstractItemView::SelectRows);
    setSelectionMode(QAbstractItemView::SingleSelection);
    setDragDropMode(QAbstractItemView::NoDragDrop);
    setExpandsOnDoubleClick(true);

    But for some reason only doubleclicks on the first column expand the items. And doubleclicks on the second columns do nothing.
    How can I understand why doubleclicks on the second column don't expand the items in the tree?


Log in to reply