Examples from book C++ GUI Programming with Qt4, 2nd Edition