here is sample program which uses QTermWidet for displaying a terminal