A Q in vi command mode invokes ex command mode. At the command line (bottom of the screen) the prompt ':' appears. The command vi returns you back to vi command mode.
In vi command mode you can issue a single ex command and immediately return to vi mode by prefacing an ex command with a ':'.