{"id":21905299,"url":"https://github.com/pedrolcl/consolewidget","last_synced_at":"2026-05-15T23:32:02.229Z","repository":{"id":243548595,"uuid":"812705007","full_name":"pedrolcl/consolewidget","owner":"pedrolcl","description":"lightweight Qt console widget based on QPlainTextEdit","archived":false,"fork":false,"pushed_at":"2025-12-20T11:06:59.000Z","size":27,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-22T15:59:15.481Z","etag":null,"topics":["console","consolewidget","qt","qt6","shell"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pedrolcl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-09T16:41:12.000Z","updated_at":"2025-12-20T12:59:02.000Z","dependencies_parsed_at":"2024-06-09T19:27:20.434Z","dependency_job_id":"2808e523-8b92-4c9c-b379-affc5d702c7b","html_url":"https://github.com/pedrolcl/consolewidget","commit_stats":null,"previous_names":["pedrolcl/consolewidget"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pedrolcl/consolewidget","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrolcl%2Fconsolewidget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrolcl%2Fconsolewidget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrolcl%2Fconsolewidget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrolcl%2Fconsolewidget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pedrolcl","download_url":"https://codeload.github.com/pedrolcl/consolewidget/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrolcl%2Fconsolewidget/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33083528,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["console","consolewidget","qt","qt6","shell"],"created_at":"2024-11-28T16:32:32.342Z","updated_at":"2026-05-15T23:32:02.224Z","avatar_url":"https://github.com/pedrolcl.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ConsoleWidget\n\nThis component was developed by George Apostolopoulos in 2020 as part of [**QDaq** - Qt-based Data Acquisition](https://gitlab.com/qdaq/qdaq) \nand forked by Pedro López-Cabanillas in 2024 from [this GitHub repository](https://github.com/gapost/qconsolewidget).\n\nA lightweight Qt console widget based on QPlainTextEdit providing \nalso a QIODevice interface.\n\nIt can be used as an interactive scripting terminal or a log window.\nFeatures include standard console-like editing, command history, \nformatted input, output \u0026 error streams.\n\nTODO: syntax highlighting\n\nYou may find here two repositories using this component as a submodule:\n\n* [netcat-qt](https://github.com/pedrolcl/netcat-qt)\n* [fluidsynth-qt-gui](https://github.com/pedrolcl/fluidsynth-qt-gui)\n\n## Usage\n\nIf you don't want to use submodules, then to find the library downstream with CMake, you need to use either\n[pkg-config](https://cmake.org/cmake/help/latest/module/FindPkgConfig.html#module:FindPkgConfig) or\n[find_package](https://cmake.org/cmake/help/latest/command/find_package.html#command:find_package)\n\n```CMake\nfind_package(PkgConfig)\npkg_check_modules(consolewidget)\n```\n\nor\n\n```CMake\nfind_package(consolewidget)\n```\n\nYou need to build and install `consolewidget` first in some already well known prefix, \nor you need to call cmake with [-DCMAKE_PREFIX_PATH=yourprefix](https://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html), \nor alternatively with -Dconsolewidget_DIR=yourbuilddir (without needing to install the component).\n\nIn C++, instantiate the widget and set it to input mode. Connect a QObject slot\nto the consoleCommand signal to receive the user input.\n\n```c++\nConsoleWidget w;\nw.writeStdOut(\"enter command\u003e \");\nw.setMode(ConsoleWidget::Input);\nQObject::connect(\u0026w,SIGNAL(consoleCommand(QString)),MyQObject,SLOT(evalCommand(QString)))\n...\nMyQObjet::evalCommand(const QString\u0026 code)\n{\n    ...\n}\n```\n\nAlternatively you can use a QTextStream to interact with ConsoleWidget:\n\n```c++\nConsoleWidget w;\nw.device()-\u003eopen(QIODevice::ReadWrite); // open the console's QIODevice\nQTextStream stream(w.device());\nstream \u003c\u003c \"Hello World!\" \u003c\u003c endl; // output goes to the widget\n```\n\nThe stream can also be used for input\n\n```c++\nstream \u003c\u003c \"Enter an integer n = \" \u003c\u003c flush;\nint n;\nstream.device()-\u003ewaitForReadyRead();\nstream \u003e\u003e n;\n```\nThe call to ```waitForReadyRead()``` enters a local loop waiting for\nthe user to enter a command and hit return. \n\n## License\n\nSPDX-License-Identifier: MIT  \nCopyright (c) 2020 George Apostolopoulos  \nCopyright (c) 2024-2025 Pedro López-Cabanillas \u003cplcl@users.sf.net\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedrolcl%2Fconsolewidget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpedrolcl%2Fconsolewidget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedrolcl%2Fconsolewidget/lists"}