new sample + tested with Qt 4.6.2