0
QList<DiagramzhiwuItem*> zhiwulist;

QList<Item*> zhiwus[zhiwuitemlist.count()];  // error here
MikeCAT
  • 73,922
  • 11
  • 45
  • 70
shen
  • 1
  • 1
    The 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> zhiwus(zhiwuitemlist.count());`. – Scheff's Cat Apr 27 '21 at 14:20

0 Answers0