Because I think you missunderstood the docs:
Each subsequent element corresponds to the next capturing open left parentheses. Thus cap(1) is the text of the first capturing parentheses, cap(2) is the text of the second, and so on.
So QRegEx::cap(int n) does not retrieve the n'th match, but the match of the n'th parentheses in your expression, and you have only one (n=0) which is why only the first cap() returns a non empty string.

What you are looking for is QRegExp::capturedTexts() I think.