clone of QTermWidget from https://github.com/zester/Quantum