Does the Qt example which demonstrates different composite modes work for you?