Millimetered paper generator in C++/Qt4