{"id":13645482,"url":"https://github.com/lxqt/qtermwidget","last_synced_at":"2025-05-14T20:04:09.526Z","repository":{"id":2528085,"uuid":"3504505","full_name":"lxqt/qtermwidget","owner":"lxqt","description":"The terminal widget for QTerminal","archived":false,"fork":false,"pushed_at":"2025-04-09T11:49:10.000Z","size":1828,"stargazers_count":524,"open_issues_count":48,"forks_count":260,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-04-13T16:07:21.729Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://lxqt.github.io","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lxqt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"COPYING-CMAKE-SCRIPTS","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-02-21T14:24:17.000Z","updated_at":"2025-04-13T14:40:08.000Z","dependencies_parsed_at":"2023-07-06T09:48:48.789Z","dependency_job_id":"6967dba0-dd6f-458f-b8d8-561e9b249456","html_url":"https://github.com/lxqt/qtermwidget","commit_stats":{"total_commits":627,"total_committers":125,"mean_commits":5.016,"dds":0.8516746411483254,"last_synced_commit":"ee40ce3cfe7617430a8349b7ea179cbba5b59192"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lxqt%2Fqtermwidget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lxqt%2Fqtermwidget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lxqt%2Fqtermwidget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lxqt%2Fqtermwidget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lxqt","download_url":"https://codeload.github.com/lxqt/qtermwidget/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248741206,"owners_count":21154254,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T01:02:35.756Z","updated_at":"2025-04-13T16:07:29.567Z","avatar_url":"https://github.com/lxqt.png","language":"C++","readme":"# QTermWidget\n\n## Overview\n\nA terminal emulator widget for Qt 6.\n\nQTermWidget is an open-source project originally based on the KDE4 Konsole application, but it took its own direction later on.\nThe main goal of this project is to provide a Unicode-enabled, embeddable Qt widget for using as a built-in console (or terminal emulation widget).\n\nIt is compatible with BSD, Linux and OS X.\n\nThis project is licensed under the terms of the [GPLv2](https://www.gnu.org/licenses/gpl-2.0.en.html) or any later version. See the LICENSE file for the full text of the license. Some files are published under compatible licenses:\n```\nFiles: example/main.cpp\n       lib/TerminalCharacterDecoder.cpp\n       lib/TerminalCharacterDecoder.h\n       lib/kprocess.cpp\n       lib/kprocess.h\n       lib/kpty.cpp\n       lib/kpty.h\n       lib/kpty_p.h\n       lib/kptydevice.cpp\n       lib/kptydevice.h\n       lib/kptyprocess.cpp\n       lib/kptyprocess.h\n       lib/qtermwidget.cpp\n       lib/qtermwidget.h\n       lib/qtermwidget_interface.h\nCopyright: Author Adriaan de Groot \u003cgroot@kde.org\u003e\n           2010, KDE e.V \u003ckde-ev-board@kde.org\u003e\n           2002-2007, Oswald Buddenhagen \u003cossi@kde.org\u003e\n           2006-2008, Robert Knight \u003crobertknight@gmail.com\u003e\n           2002, Waldo Bastian \u003cbastian@kde.org\u003e\n           2008, e_k \u003ce_k@users.sourceforge.net\u003e\n           2022, Francesc Martinez \u003cinfo@francescmm.com\u003e\nLicense: LGPL-2+\n\nFiles: cmake/FindUtf8Proc.cmake\nCopyright: 2009-2011, Kitware, Inc\n           2009-2011, Philip Lowman \u003cphilip@yhbt.com\u003e\nLicense: BSD-3-clause\n```\n\n## Installation\n\n### Compiling sources\n\nThe only runtime dependency is qtbase ≥ 6.6.0.\nBuild dependencies are as follows:\n- CMake ≥ 3.16.0 serves as the build system and therefore needs to be present to compile.\n- [lxqt-build-tools](https://github.com/lxqt/lxqt-build-tools/) ≥ 2.0.0 is also needed for compilation.\n- Git is needed to optionally pull latest VCS checkouts.\n\nCode configuration is handled by CMake. CMake variable `CMAKE_INSTALL_PREFIX` will normally have to be set to `/usr`, depending on the way library paths are dealt with on 64bit systems. Variables like `CMAKE_INSTALL_LIBDIR` may have to be set as well.\n\nTo build, run `make`. To install, run `make install` which accepts variable `DESTDIR` as usual.\n\nTo build PyQt bindings, build this library first, and then invoke `sip-wheel` in pyqt/ directory. Environment variables `CXXFLAGS` and `LDFLAGS` can be used to specify non-installed or non-standard directories for headers and shared libraries, and the built Python wheel can be installed by standard tools like `pip`. See [the CI script](.ci/build.sh) for a complete example.\n\n### Binary packages\n\nThe library is provided by all major Linux distributions. This includes Arch Linux, Debian, Fedora, openSUSE and all of their children, given they use the same package repositories.\nJust use the distributions' package managers to search for string `qtermwidget`.\n\n\n### Translation\n\nTranslations can be done in [LXQt-Weblate](https://translate.lxqt-project.org/projects/lxqt-desktop/qtermwidget/)\n\n\u003ca href=\"https://translate.lxqt-project.org/projects/lxqt-desktop/qtermwidget/\"\u003e\n\u003cimg src=\"https://translate.lxqt-project.org/widgets/lxqt-desktop/-/qtermwidget/multi-auto.svg\" alt=\"Translation status\" /\u003e\n\u003c/a\u003e\n\n## API\n### Public Types\nType | Variable\n| ---: | :---\nenum | ScrollBarPosition { NoScrollBar, ScrollBarLeft, ScrollBarRight }\nenum | KeyboardCursorShape { BlockCursor, UnderlineCursor, IBeamCursor }\n\n### Properties\n* flowControlEnabled : bool\n* getPtySlaveFd : const int\n* getShellPID : int\n* getForegroundProcessId : int\n* getTerminalFont : QFont\n* historyLinesCount : int\n* icon : const QString\n* keyBindings : QString\n* screenColumnsCount : int\n* selectedText(bool _preserveLineBreaks_ = true) : QString\n* sizeHint : const QSize\n* terminalSizeHint : bool\n* title : const QString\n* wordCharacters : QString\n* workingDirectory : QString\n\n### Public Functions\nType | Function\n| ---: | :---\n| | QTermWidget(int _startnow_ = 1, QWidget *_parent_ = 0)\nvirtual | ~QTermWidget()\nvoid | changeDir(const QString _\u0026dir_)\nvoid | getSelectionEnd(int \u0026_row_, int \u0026_column_)\nvoid | getSelectionStart(int \u0026_row_, int \u0026_column_)\nvoid | scrollToEnd()\nvoid | sendText(QString \u0026_text_)\nvoid | setArgs(QStringList \u0026_args_)\nvoid | setAutoClose(bool _enabled_)\nvoid | setColorScheme(const QString \u0026_name_)\nvoid | setEnvironment(const QStringList \u0026_environment_)\nvoid | setFlowControlEnabled(bool _enabled_)\nvoid | setFlowControlWarningEnabled(bool _enabled_)\nvoid | setHistorySize(int _lines_)\nvoid | setKeyboardCursorShape(QTermWidget::KeyboardCursorShape _shape_)\nvoid | setMonitorActivity(bool _enabled_)\nvoid | setMonitorSilence(bool _enabled_)\nvoid | setMotionAfterPasting(int _action_)\nvoid | setScrollBarPosition(QTermWidget::ScrollBarPosition _pos_)\nvoid | setSelectionEnd(int _row_, int _column_)\nvoid | setSelectionStart(int _row_, int _column_)\nvoid | setShellProgram(const QString \u0026_program_)\nvoid | setSilenceTimeout(int _seconds_)\nvoid | setTerminalFont(QFont \u0026_font_)\nvoid | setTerminalOpacity(qreal _level_)\nvoid | setTerminalSizeHint(bool _enabled_)\nvoid | setWorkingDirectory(const QString \u0026_dir_)\nvoid | startShellProgram()\nvoid | startTerminalTeletype()\nQStringList | availableColorSchemes()\n\n### Public Slots\nType | Function\n| ---: | :---\nvoid | copyClipboard()\nvoid | pasteClipboard()\nvoid | pasteSelection()\nvoid | zoomIn()\nvoid | zoomOut()\nvoid | setSize(_const QSize \u0026_)\nvoid | setKeyBindings(const QString \u0026_kb_)\nvoid | clear()\nvoid | toggleShowSearchBar()\n\n### Signals\nType | Function\n| ---: | :---\nvoid | activity()\nvoid | bell(const QString \u0026_message_)\nvoid | copyAvailable(bool)\nvoid | finished()\nvoid | profileChanged(const QString \u0026_profile_)\nvoid | receivedData(const QString \u0026_text_)\nvoid | sendData(const char*, int)\nvoid | silence()\nvoid | termGetFocus()\nvoid | termKeyPressed(QKeyEvent*)\nvoid | termLostFocus()\nvoid | titleChanged()\nvoid | urlActivated(const QUrl \u0026, bool _fromContextMenu_)\n\n### Static Public Members\nType | Function\n| ---: | :---\nstatic QStringList | availableColorSchemes()\nstatic QStringList | availableKeyBindings()\nstatic void | addCustomColorSchemeDir(const QString \u0026*custom_dir*)\n\n### Protected Functions\nType | Function\n| ---: | :---\nvirtual void | resizeEvent(_QResizeEvent_*)\n\n### Protected Slots\nType | Function\n| ---: | :---\nvoid | sessionFinished()\nvoid | selectionChanged(bool _textSelected_)\n\n### Member Type Documentation\n**enum QTermWidget::ScrollBarPosition**\\\nThis enum describes the location where the scroll bar is positioned in the display widget when calling QTermWidget::setScrollBarPosition().\n\nConstant | Value | Description\n| --- | :---: | --- |\nQTermWidget::NoScrollBar | 0x0 | Do not show the scroll bar.\nQTermWidget::ScrollBarLeft | 0x1 | Show the scroll bar on the left side of the display.\nQTermWidget::ScrollBarRight | 0x2 | Show the scroll bar on the right side of the display.\n\n\\\n**enum QTermWidget::KeyboardCursorShape**\\\nThis enum describes the available shapes for the keyboard cursor when calling QTermWidget::setKeyboardCursorShape().\n\nConstant | Value | Description\n| --- | :---: | --- |\nQTermWidget::BlockCursor | 0x0 | A rectangular block which covers the entire area of the cursor character.\nQTermWidget::UnderlineCursor | 0x1 | A single flat line which occupies the space at the bottom of the cursor character's area.\nQTermWidget::IBeamCursor | 0x2 | A cursor shaped like the capital letter 'I', similar to the IBeam cursor used in Qt/KDE text editors.\n\n### Property Documentation\n**flowControlEnabled : bool**\\\nReturns whether flow control is enabled.\n\n**getPtySlaveFd : const int**\\\nReturns a pty slave file descriptor. This can be used for display and control a remote terminal.\n\n\u003c!--**getShellPID : int**\\--\u003e\n**getForegroundProcessId : int**\\\nReturns the PID of the foreground process. This is initially the same as processId() but can change\nas the user starts other programs inside the terminal. If there is a problem reading the foreground\nprocess id, 0 will be returned.\n\n\u003c!--**getTerminalFont : QFont**\\--\u003e\n\n**historyLinesCount : int**\\\nReturns the number of lines in the history buffer.\n\n\u003c!--**icon : const QString**\\--\u003e\n\n**keyBindings : QString**\\\nReturns current key bindings.\n\n\u003c!--**screenColumnsCount : int**\\--\u003e\n\n**selectedText(bool _preserveLineBreaks_ = true) : QString**\\\nReturns the currently selected text.\n\n\u003c!--**sizeHint : const QSize**\\--\u003e\n\u003c!--**terminalSizeHint : bool**\\--\u003e\n\u003c!--**title : const QString**\\--\u003e\n\u003c!--**workingDirectory : QString**\\--\u003e\n\n**wordCharacters : QString**\\\nWhen selecting text by word, consider these characters to be word characters in addition to\nalphanumeric characters, default is `:@-./_~`.\n\n### Member Function Documentation\n\u003c!--__void activity()__\\--\u003e\n\u003c!--__void bell(const QString \u0026_message_)__\\--\u003e\n\n__void changeDir(const QString _\u0026dir_)__\\\nAttempt to change shell directory (Linux only).\n\n__void clear()__\\\nClear the terminal content and move to home position.\n\n\u003c!--__void copyAvailable(bool)__\\--\u003e\n\n__void copyClipboard()__\\\nCopy selection to clipboard.\n\n\u003c!--__void finished()__\\--\u003e\n\u003c!--__void getSelectionEnd(int \u0026_row_, int \u0026_column_)__\\--\u003e\n\u003c!--__void getSelectionStart(int \u0026_row_, int \u0026_column_)__\\--\u003e\n\n__void pasteClipboard()__\\\nPaste clipboard to terminal.\n\n__void pasteSelection()__\\\nPaste selection to terminal.\n\n\u003c!--__void profileChanged(const QString \u0026_profile_)__\\--\u003e\n\n__void receivedData(const QString \u0026_text_)__\\\nSignals that we received new data from the process running in the terminal emulator.\n\n__void scrollToEnd()__\\\nWrapped, scroll to end of text.\n\n__void sendData(const char*, int)__\\\nEmitted when emulator send data to the terminal process (redirected for external recipient). It can be used for control and display the remote terminal.\n\n__void sendText(QString \u0026_text_)__\\\nSend text to terminal.\n\n__void setArgs(QStringList \u0026_args_)__\\\nSets the shell program arguments, default is none.\n\n__void setAutoClose(bool _enabled_)__\\\nAutomatically close the terminal session after the shell process exits or keep it running.\n\n__void setColorScheme(const QString \u0026_name_)__\\\nSets the color scheme, default is white on black.\n\n__void setEnvironment(const QStringList \u0026_environment_)__\\\nSets environment variables.\n\n__void setFlowControlEnabled(bool _enabled_)__\\\nSets whether flow control is enabled.\n\n__void setFlowControlWarningEnabled(bool _enabled_)__\\\nSets whether the flow control warning box should be shown when the flow control stop key (Ctrl+S) is pressed.\n\n__void setHistorySize(int _lines_)__\\\nHistory size for scrolling.\n\n__void setKeyBindings(const QString \u0026_kb_)__\\\nSet named key binding for given widget.\n\n__void setKeyboardCursorShape(QTermWidget::KeyboardCursorShape _shape_)__\\\nSets the shape of the keyboard cursor.  This is the cursor drawn at the position in the terminal where keyboard input will appear.\n\n\u003c!--__void setMonitorActivity(bool _enabled_)__\\--\u003e\n\u003c!--__void setMonitorSilence(bool _enabled_)__\\--\u003e\n\u003c!--__void setMotionAfterPasting(int _action_)__\\--\u003e\n\n__void setScrollBarPosition(QTermWidget::ScrollBarPosition _pos_)__\\\nSets presence and position of scrollbar.\n\n\u003c!--__void setSelectionEnd(int _row_, int _column_)__\\--\u003e\n\u003c!--__void setSelectionStart(int _row_, int _column_)__\\--\u003e\n\n__void setShellProgram(const QString \u0026_program_)__\\\nSets the shell program, default is /bin/bash.\n\n\u003c!--__void setSilenceTimeout(int _seconds_)__\\--\u003e\n\u003c!--__void setSize(_const QSize \u0026_)__\\--\u003e\n\n__void setTerminalFont(QFont \u0026_font_)__\\\nSets terminal font. Default is application font with family Monospace, size 10. Beware of a performance penalty and display/alignment issues when using a proportional font.\n\n\u003c!--__void setTerminalOpacity(qreal _level_)__\\--\u003e\n\n__void setTerminalSizeHint(bool _enabled_)__\\\nExposes TerminalDisplay::TerminalSizeHint.\n\n\u003c!--__void setWorkingDirectory(const QString \u0026_dir_)__\\--\u003e\n\u003c!--__void silence()__\\--\u003e\n\n__void startShellProgram()__\\\nStarts shell program if it was not started in constructor.\n\n__void startTerminalTeletype()__\\\nStarts terminal teletype as is and redirect data for external recipient. It can be used for display and control a remote terminal.\n\n\u003c!--__void termGetFocus()__\\--\u003e\n\u003c!--__void termKeyPressed(QKeyEvent*)__\\--\u003e\n\u003c!--__void termLostFocus()__\\--\u003e\n\u003c!--__void titleChanged()__\\--\u003e\n\u003c!--__void toggleShowSearchBar()__\\--\u003e\n\u003c!--__void urlActivated(const QUrl \u0026, bool _fromContextMenu_)__\\--\u003e\n\n__void zoomIn()__\\\nZooms in on the text.\n\n__void zoomOut()__\\\nZooms out in on the text.\n","funding_links":[],"categories":["C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flxqt%2Fqtermwidget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flxqt%2Fqtermwidget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flxqt%2Fqtermwidget/lists"}