Calling WStandardItemModel::setHeaderData() on an empty model crashes
Calling WStandardItemModel::setHeaderData() on an empty model crashes the whole application. The program exits unexpectedly.
Updated by Roel Standaert 5 months ago
- Target version set to future
setHeaderData() on an empty model indeed does not work, that's a limitation of
WStandardItemModel, and you should set the column count first.
However, I do think that instead of crashing it should probably either:
- throw, or
false(this is what Qt's