User interactions with column width in QTreeWidget

36 Views Asked by At

I am using QTreeWidget to display a table with data, and want to see if there is any way to allow the user to change the width of the columns when the data are displayed.

QTreeWidget qtw = new QTreeWidget(qgb[0]);
qtw->setColumnCount(10);
QStringList labels = {"Label 1", "Label 2", "Label 3", "Label 4", "Label 5", "Label 6", "Label 7", "Label 8", "Label 9", "Label 10"};
qtw->setHeaderLabels(labels);

// After that I go on and populate the columns

However, when the code is run, the user has no control over the column width (i.e., cannot change it).

Is there any way to let the user do it?

0

There are 0 best solutions below