Utils::FancyLineEdit Class
class Utils::FancyLineEditFancyLineEdit 클래스는 여러 가지 선택적 기능을 갖춘 향상된 라인 편집기입니다. 더 보기...
| Header: | #include <FancyLineEdit> |
| Inherits: | Utils::CompletingLineEdit |
| Inherited By: | Utils::ClassNameValidatingLineEdit and Utils::FileNameValidatingLineEdit |
공개 함수
| void | setValidationFunction(const Utils::FancyLineEdit::ValidationFunction &fn) |
정적 공용 멤버
| Utils::FancyLineEdit::ValidationFunction | defaultValidationFunction() |
상세 설명
FancyLineEdit 인스턴스에는 다음이 포함될 수 있습니다:
- 메뉴에 연결된 한쪽 면에 내장된 픽스맵.
- 포커스가 없고 내용이 비어 있을 때 회색으로 표시되는 힌트 텍스트("Type Here to"와 같은). changed 신호에 연결하고 텍스트를 조회할 때, isShowingHintText()가 true를 반환하면(즉, 유효한 사용자 입력이 포함되지 않은 경우) 텍스트가 해당 힌트 텍스트로 설정된다는 점에 유의해야 합니다.
- 이력 자동 완성 기능.
- validationFunction 를 설정하여 텍스트 필드의 내용을 유효성 검사할 수 있는 기능.
유효하지 않은 경우, 텍스트 색상이 빨간색으로 바뀌고 툴팁에 오류 메시지가 표시됩니다. 이 방식은 사용자가 특정 문자를 입력하지 못하게 막는 ` QValidator `보다 덜 거슬립니다.
표시되는 힌트 텍스트는 유효성 검사 상태를 'DisplayingInitialText'로 만들며, 이는 유효하지는 않지만 빨간색으로 표시되지는 않습니다.
멤버 함수 문서
[static] Utils::FancyLineEdit::ValidationFunction FancyLineEdit::defaultValidationFunction()
라인 편집기의 유효성 검사기를 동기식으로 실행하는 기본 유효성 검사 함수를 반환합니다.
setValidationFunction()도 참조하십시오 .
void FancyLineEdit::setValidationFunction(const Utils::FancyLineEdit::ValidationFunction &fn)
동기식 또는 비동기식 유효성 검사 함수 fn 를 설정합니다. 비동기식 유효성 검사 함수는 FancyLineEdit 인스턴스가 소멸된 후에도 계속 실행될 수 있습니다. 종료 과정에서 비동기식 유효성 검사 함수는 플러그인 인스턴스가 삭제되기 직전까지 계속 실행될 수 있습니다(이 시점에서 플러그인 관리자는 함수가 완료될 때까지 기다린 후 작업을 계속합니다).
defaultValidationFunction()도 참조하십시오 .
Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.