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

QTreeWidget column name



  • How does one set the column name of a QTreeWidget. I have search many documents and forums without any results.

    Help is appreciated.



  • fixed it..
    heres the code if any other newbies are having the same problem.

    @
    QTreeWidget* TreeWidget = new QTreeWidget(this);

    ...

    QStringList ColumnNames;
    ColumnNames << "Column 1" << "Column 2";

    TreeWidget->SetHeaderLabels(ColumnNames);
    @


Log in to reply