Basic Abstract Algebra question

I was helping out a high school student with factoring when a noticed that polynomials that factor in $\mathbb{Q[x]}$ also factor in $\mathbb{Z[x]}$. I was wondering if there is a formal argument to be made here from this observation. For example, $f(x) = 6x^2 + 7x + 2$ can be factored as $(6x + 3)(x + \frac{2}{3})$ in $\mathbb{Q[x]}$ and $(2x+1)(3x+2)$ in $\mathbb{Z[x]}$. Why does this work formally?

-
As the answers suggest, you've basically discovered the statement of a famous theorem (Gauss' Lemma). I'd count that as a nice catch! –  Will Nelson Feb 19 '13 at 6:48

What you have noticed is (the contrapositive of) Gauss's lemma, which states that if a polynomial $f$ with integer coefficients is irreducible as an element of $\mathbb{Z}[x]$ (i.e. it does not factor non-trivially into polynomials with integer coefficients), then $f$ is also irreducible as an element of $\mathbb{Q}[x]$ (i.e. it does not factor non-trivially into polynomials with rational coefficients).
Something to keep in mind, however, is that a non-trivial factorization in $\mathbb{Z}[x]$ can look a bit strange if you're not used to it. For example, the polynomial $2x+2$ factors nontrivially: $$2x+2=(2)(x+1).$$ This is a non-trivial factorization in $\mathbb{Z}[x]$ because $2$ is not a unit in $\mathbb{Z}[x]$.