  The recent interest in $q$-Stirling numbers of the second kind in type B
prompted us to give a type B analogue of a classical identity connecting the
$q$-Stirling numbers of the second kind and Carlitz's major $q$-Eulerian
numbers, which turns out to be a $q$-analogue of an identity due to Bagno,
Biagioli and Garber. We provide a combinatorial proof of this identity and an
analytical proof of a more general identity for colored permutations. In
addition, we prove some $q$-identities about the $q$-Stirling numbers of the
second kind in types A, B and D.
