Here are some important links that should help with this class.
Qt : very useful for C++
From the Qt website here is a direct link to source code for tetris