http://kde-apps.org/content/show.php/?content=157471 You'll have to substitute QApplication and maybe Xlib with xcb. And you're aware that you're cheating your homework and thus basically failed the class?