Quote Originally Posted by KShots
Also caught a childish mistake (surprised the compiler didn't catch it) - qp is both a QPrintDialog and a QPixmap. I have no idea how the compiler was working with that, but I changed the pixmap to qpm...
The compiler didn't catch it because it is valid code. You declared the variables in different scopes, so there was no real problem there (although it's good practice to use unique variable names).