QList<DiagramzhiwuItem*> zhiwulist;
QList<Item*> zhiwus[zhiwuitemlist.count()]; // error here
Asked
Active
Viewed 199 times
0
-
1The size of an array has to be compile-time computable. This is either a constant or might be a `constexpr`. `QList::count()` is not qualified `constexpr`. – Scheff's Cat Apr 27 '21 at 14:17
-
Did you really intend to declare an array of `QList
- `s? You may try a `QVector` instead of the array: `QVector
– Scheff's Cat Apr 27 '21 at 14:20> zhiwus(zhiwuitemlist.count());`. - `s? You may try a `QVector` instead of the array: `QVector