In this note, we show how the determinant of the q-distance matrix Dq(T) of a weighted directed graph G can be expressed in terms of the corresponding determinants for the blocks of G, and thus generalize the results obtained by Graham et al. [R.L. Graham, A.J. Hoffman and H. Hosoya, On the distance matrix of a directed graph, J. Graph Theory 1 (1977) 85-88]. Further, by means of the result, we determine the determinant of the q-distance matrix of the graph obtained from a connected weighted graph G by adding the weighted branches to G, and so generalize in part the results obtained by Bapat et al. [R.B. Bapat, S. Kirkland and M. Neumann, On distance matrices and Laplacians, Linear Algebra Appl. 401 (2005) 193- 209]. In particular, as a consequence, determinantal formulae of q-distance matrices for unicyclic graphs and one class of bicyclic graphs are presented.