We define and study a series indexed by rooted trees and with coefficients in Q(q). We show that it is related to a family of Lie idempotents. We prove that this series is a q-deformation of a more classical series and that some of its coefficients are Carlitz q-Bernoulli numbers.