Here are some of the examples that are included with Qt:
These paths are relative to the examples subdirectory in the Qt distribution. You will find Makefiles, header files and so on there. Only the most relevant code is here.