Forked from the original QTermWidget 2.4.0, this version is natively Windows-only, powered by Windows ConPTY for terminal emulation. It is built with Qt5 + CMake, with a minimum supported Qt version of 5.12.11.
-
Windows Exclusive Terminal Backend
- Implements real cmd/PowerShell terminals via the native
CreatePseudoConsoleConPTY API.
- Implements real cmd/PowerShell terminals via the native
-
Full-Featured Terminal Emulation
-
256-color & true-color rendering with customizable color schemes.
-
Complete VT escape sequence parsing, with native support for cursors, text selection and auto line wrapping.
-
Native Chinese & Unicode rendering; optional utf8proc library for advanced character width calculation.
-
-
Built-in UI Widgets
-
Integrated search bar, copy/paste functions, font scaling, and full set of keyboard shortcuts.
-
Fully customizable keyboard mapping layouts.
-
-
Standard CMake Build System
-
Complete CMake build scripts requiring CMake 3.18 or higher.
-
Produces standard shared libraries with exported CMake config files for downstream integration.
-
Includes a standalone test terminal binary
test_terminal.
-
-
Minimal High-Level API A single
QTermWidgetcontrol for drop-in integration. Launch terminal processes with one line of code and capture raw terminal output via Qt signals.
-
CMake ≥ 3.18.0
-
Qt5 Widgets ≥ 5.12.11
-
Qt5 LinguistTools (for translation files)
Relies on system-native ConPTY APIs. Compatible with Windows 10 1903 and all Windows 11 releases; no extra low-level system libraries required.
utf8proc: Optimizes width calculation for complex Unicode characters.
git clone https://github.com/xxx/qtermwidget.git
cd qtermwidgetmkdir build && cd buildcmake .. -G "Visual Studio 16 2019" -A x64 ^
-DCMAKE_PREFIX_PATH="Path/to/Qt5.12.11/lib/cmake" ^
-DBUILD_TEST_TERMINAL=ON-DBUILD_EXAMPLE=ON # Build official demo programs
-DUSE_UTF8PROC=ON # Enable utf8proc for Unicode character width optimization
-DUPDATE_TRANSLATIONS=ON # Regenerate & update TS translation filescmake --build . --config RelWithDebInfocmake --install .
# Uninstall command
cmake --build . --target uninstallThe upstream open-source QTermWidget is designed exclusively for Unix-like systems. This project fully rewrites the underlying backend and retains only a Windows ConPTY adaptation layer:
-
Pure Windows implementation of
KPtyDevice-
initConPTY()creates a pseudo-terminal paired with bidirectional anonymous read/write pipes. -
Asynchronous terminal output reading using overlapped I/O in background QtConcurrent threads.
-
Thread-safe process start/stop logic; all kernel handles are automatically released to eliminate handle/memory leaks.
-
-
Unified upper-layer wrappers:
KPtyProcess/Pty. Business logic code requires no modification to handle underlying pipe mechanics. -
Default supported shells:
cmd.exeandpowershell.exe. -
Dynamic terminal resizing via the
ResizePseudoConsoleAPI. -
Pipes enable
ENABLE_VIRTUAL_TERMINAL_PROCESSINGto fully parse VT color and cursor control escape sequences.
qtermwidget/
├── CMakeLists.txt
├── README.md
├── cmake/
├── lib/
│ ├── kptydevice.h/cpp
│ ├── kptyprocess.h/cpp
│ ├── Pty.h/cpp
│ ├── qtermwidget.h/cpp
│ ├── Vt102Emulation.cpp
│ ├── SearchBar.ui/h/cpp
│ ├── color-schemes/
│ └── kb-layouts/
├── test/
│ └── main.cpp
├── examples/cpp/
└── translations/
-
Core library: Windows shared library
qtermwidget5.dll -
Executable binary:
test_terminal(standalone terminal test utility) -
CMake export config:
qtermwidget5-config.cmakefor direct linking in external projects -
Resource assets: Color schemes, keyboard layouts and translation files installed automatically to system data directories
Inherits the open-source license of original QTermWidget: LGPL-2.1 / GPL-2.0. Permits private secondary development and commercial use.
-
Operating System: Windows only (Windows 10 1903, Windows 11 and newer). Linux / macOS are unsupported.
-
Qt Framework: Qt5 only (5.12 ~ 5.15). The current branch is incompatible with Qt6.
-
CMake: Minimum required version 3.18.0.