Skip to content
QtWS25 Last Chance
  • 0 Votes
    6 Posts
    2k Views
    Thanks a lot for your suggestions. I ended up doing it with the vectors because it was most elegant for my brain... *.h QVector<QLabel*> labels; *.cpp for(int i=0;i<24;i++){ labels.append(new QLabel(QString::number(23-i))); } for(int i=0;i<labels.size();i++){ labels[i].setAlignment(Qt::AlignCenter); } and then the same for the checkboxes. I guess the vector saved about 100 lines of code. Works like a charm :) [image: 5fabe5b1-7606-4c8c-a27a-26d179311380.png]