Starting from a nondecreasing function $K:[0,\infty)\to
[0,\infty)$, we introduce a M\"obius-invariant Banach space
$Q_K$ of functions analytic in the unit disk in the plane. We
develop a general theory of these spaces, which yields new
results and also, for special choices of $K$, gives most basic
properties of $Q_p$-spaces. We have found a general criterion
on the kernels $K_1$ and $K_2$, $K_1\leq K_2$, such that
$Q_{K_2}\subsetneqq Q_{K_1}$, as well as necessary and
sufficient conditions on $K$ so that $Q_K=\mathcal{B}$ or $Q_K
=\mathcal{D}$, where the Bloch space $\mathcal{B}$ and the
Dirichlet space $\mathcal{D}$ are the largest, respectively
smallest, spaces of $Q_K$-type. We also consider the
meromorphic counterpart $Q_K^\#$ of $Q_K$ and discuss the
differences between $Q_K$-spaces and $Q_K^\#$-classes.