I want all the numbers that are shown on the displays to be linked to the names next to them. The sorted numbers should not be shown in the list on the right like right now with the code, but the names (NPC´s and PC - Labels). How does it work?
int iniwerte[7]; // Array for the values by my LCD-displays
ui->lcdNumber_initiative_1->display(iniwerte[0]); // Each display got a value
ui->lcdNumber_initiative_2->display(iniwerte[1]);
ui->lcdNumber_initiative_3->display(iniwerte[2]);
ui->lcdNumber_initiative_4->display(iniwerte[3]);
ui->lcdNumber_initiative_5->display(iniwerte[4]);
std::sort(&iniwerte[0], &iniwerte[7], std::greater<int>()); // Sorting values
ui->reihenfolge->setNum(iniwerte[0]); // Sorted numbers are shown on the labels
ui->reihenfolge_2->setNum(iniwerte[1]);
ui->reihenfolge_3->setNum(iniwerte[2]);
ui->reihenfolge_4->setNum(iniwerte[3]);
ui->reihenfolge_5->setNum(iniwerte[4]);
The right list should show the associated names instead of numbers.