]> git.sesse.net Git - pkanalytics/blobdiff - players.cpp
Make the formation buttons actually do something.
[pkanalytics] / players.cpp
index 21e9bdf7e4571c644b643ceaad7398d573de7288..1854408d1bac295bce03337b5e4e28405375a721 100644 (file)
@@ -35,6 +35,15 @@ QVariant PlayersModel::headerData(int section, Qt::Orientation orientation, int
 
 QVariant PlayersModel::data(const QModelIndex &index, int role) const
 {
+       if (role == Qt::TextAlignmentRole) {
+               if (index.column() == 0) {
+                       return (Qt::AlignHCenter | Qt::AlignVCenter).toInt();
+               } else if (index.column() == 1) {
+                       return (Qt::AlignHCenter | Qt::AlignVCenter).toInt();
+               } else {
+                       return (Qt::AlignLeft | Qt::AlignVCenter).toInt();
+               }
+       }
        if (role != Qt::DisplayRole) {
                return QVariant();
        }