The aim of this paper is to extend the q-entropy from symbolic systems to a general topological dynamical system. Using a (weak) Gibbs measure as the reference measure, this paper defines q-topological entropy and q-metric entropy, then studies basic properties of these entropies. In particular, this paper describes the relations between q-topological entropy and topological pressure for almost additive potentials, and the relations between q-metric entropy and local metric entropy. Although these relations are quite similar to that described in [19], the methods used here need more techniques from the theory of thermodynamic formalism with almost additive potentials.