diff --git a/InstructorsAndTrainees/instructors/instructorsview.cpp b/InstructorsAndTrainees/instructors/instructorsview.cpp index dd2ec39..0df79e3 100644 --- a/InstructorsAndTrainees/instructors/instructorsview.cpp +++ b/InstructorsAndTrainees/instructors/instructorsview.cpp @@ -167,6 +167,8 @@ void InstructorsView::loadInstructorsFromDB() setCurrentInstructor(lastCurrentID); + treeWidget->sortItems(ColumnsTreeInsructors::clmn_Instructor, Qt::SortOrder::AscendingOrder); + mtxTreeWidget.unlock(); } diff --git a/InstructorsAndTrainees/trainees/traineesview.cpp b/InstructorsAndTrainees/trainees/traineesview.cpp index 825b157..263ab02 100644 --- a/InstructorsAndTrainees/trainees/traineesview.cpp +++ b/InstructorsAndTrainees/trainees/traineesview.cpp @@ -193,6 +193,8 @@ void TraineesView::loadTraineesFromDB() else setCurrentTrainee(lastCurrentID); + treeWidget->sortItems(ColumnsTreeTrainees::clmn_Trainee, Qt::SortOrder::AscendingOrder); + mtxTreeWidget.unlock(); }