Here are two sample programs which use QTermWidget for displaying a terminal