{"id":15209304,"url":"https://github.com/epasveer/qclearlineedit","last_synced_at":"2026-03-10T06:32:14.154Z","repository":{"id":103973711,"uuid":"500618912","full_name":"epasveer/QClearLineEdit","owner":"epasveer","description":"QLineEdit that better handles the 'clear' action.","archived":false,"fork":false,"pushed_at":"2022-06-06T23:26:04.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-09T12:55:29.743Z","etag":null,"topics":["qlineedit","qt","qt-framework","qt-widgets"],"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/epasveer.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":"2022-06-06T23:03:37.000Z","updated_at":"2024-12-25T08:45:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"787566ea-b2ab-4193-92fd-a94376e85be2","html_url":"https://github.com/epasveer/QClearLineEdit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epasveer%2FQClearLineEdit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epasveer%2FQClearLineEdit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epasveer%2FQClearLineEdit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epasveer%2FQClearLineEdit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epasveer","download_url":"https://codeload.github.com/epasveer/QClearLineEdit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242692349,"owners_count":20170228,"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":["qlineedit","qt","qt-framework","qt-widgets"],"created_at":"2024-09-28T07:23:14.847Z","updated_at":"2026-03-10T06:32:14.100Z","avatar_url":"https://github.com/epasveer.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QClearLineEdit\n\nA version of QLineEdit that better handles the 'clear' action.\n\nThe Qt QLineEdit can have a 'clear' button in the text field. This is enabled\nwith this function :\n```\n    QLineEdit::setClearButtonEnabled(bool enable)\n```\n\n\nClicking on this button clears the text field.  *However*, it doesn't emit any signal.\nYou must programatically check the text field. :^(\n\n\nQClearLineEdit is an extension of QLineEdit.  It adds a way for the 'clear'\nbutton to emit the 'returnPressed' signal.\n\n```\n    // Create the LineEdit\n    QClearLineEdit* lineEdit = new QClearLineEdit(parent);\n\n    // Enable the new signal\n    lineEdit-\u003eenableReturnPressedOnClear();\n\n    // Connect the signal to our method\n    QObject::connect(lineEdit, \u0026QLineEdit::returnPressed,     this, MyClass::handleReturnPressed);\n```\n\n## To use:\nCopy QClearLineEdit.h and QClearLineEdit.cpp to your project. Where ever you use QLineEdit, you can use\nQClearLineEdit. Enable the new signal by calling:\n```\n    lineEdit-\u003eenableReturnPressedOnClear();\n```\nQClearLineEdit can be used in 'Designer' by promoting 'QClearLineEdit' from 'QLineEdit'.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepasveer%2Fqclearlineedit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepasveer%2Fqclearlineedit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepasveer%2Fqclearlineedit/lists"}