  Let $G$ be a non-bipartite graph which does not contain any odd cycle of
length at most $2k+1$. In this paper, we determine the maximum $Q$-index of $G$
if its order is fixed, and the corresponding extremal graph is uniquely
characterized. Moreover, if the size of $G$ is given, the maximum $Q$-index of
$G$ and the unique extremal graph are also proved.
