- connect(selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), model(), SLOT(changeCurrent(const QModelIndex &, const QModelIndex &)));
- connect(this, SIGNAL(doubleClicked(const QModelIndex &)), model(), SLOT(doubleClickReceived(const QModelIndex &)));
- connect(model(), SIGNAL(updateSelection(const QModelIndex &, QItemSelectionModel::SelectionFlags)), selectionModel(), SLOT(select(const QModelIndex &, QItemSelectionModel::SelectionFlags)));
+ setSortingEnabled(true);
+ sortByColumn(0, Qt::AscendingOrder);
+
+ connect(selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)),
+ model(), SLOT(changeCurrent(const QModelIndex &, const QModelIndex &)));
+
+ connect(this, SIGNAL(doubleClicked(const QModelIndex &)),
+ model(), SLOT(doubleClickReceived(const QModelIndex &)));
+
+ connect(model(), SIGNAL(updateSelection(const QModelIndex &, QItemSelectionModel::SelectionFlags)),
+ selectionModel(), SLOT(select(const QModelIndex &, QItemSelectionModel::SelectionFlags)));