There's several examples in the Qt docs that can be combined to provide the functionality that you want. Maybe start with a little c++ docs if you aren't familiar with the language.