PdfSelection QML Type
PDF 문서 내에서 선택한 텍스트의 표현입니다. 더 보기...
Import Statement: | import QtQuick.Pdf |
Inherits: |
속성
- document : PdfDocument
- from : point
- geometry : list<list<point>>
- hold : bool
- page : int
- renderScale : real
- text : string
- to : point
방법
- void clear()
- void copyToClipboard()
- void selectAll()
상세 설명
PdfSelection은 한 지점에서 다른 지점까지 경계 상자 내에서 텍스트 문자열과 그 지오메트리를 제공합니다.
마우스를 사용하여 선택 영역을 수정하려면 from 및 to 속성을 입력 핸들러의 적절한 속성에 바인딩하여 각각 드래그 제스처가 시작되는 위치와 끝나는 위치로 설정하고, hold 속성을 바인딩하여 드래그 제스처 중에는 true
, 제스처가 끝나면 false
로 설정합니다.
또한 PdfSelection은 iOS와 같은 플랫폼에서 텍스트 선택 핸들을 사용할 수 있도록 입력 방법 쿼리를 직접 처리합니다. 이를 위해서는 키보드 포커스가 있어야 합니다.
속성 문서
document : PdfDocument |
이 속성은 텍스트를 선택할 PDF 문서를 보유합니다.
from : point |
선택한 텍스트를 찾을 수 있는 시작 위치(페이지의 왼쪽 상단 모서리에서 픽셀 단위)입니다. 예를 들어 사용자가 마우스 버튼을 누르고 드래그를 시작한 위치에서 텍스트 선택을 시작하려면 DragHandler 의 centroid.pressPosition
에 바인딩할 수 있습니다.
geometry : list<list<point>> |
PathMultiline 인스턴스의 paths
속성에 바인딩하여 선택 영역에 포함된 텍스트 영역 주위에 직사각형을 일괄 렌더링할 수 있는 형식의 경로 집합입니다:
PdfDocument { id: doc } PdfSelection { id: selection document: doc from: textSelectionDrag.centroid.pressPosition to: textSelectionDrag.centroid.position hold: !textSelectionDrag.active } Shape { ShapePath { PathMultiline { paths: selection.geometry } } } DragHandler { id: textSelectionDrag acceptedDevices: PointerDevice.Mouse | PointerDevice.Stylus target: null }
PathMultiline참조 .
hold : bool |
page : int |
검색할 페이지 번호입니다.
QtQuick::Image::currentFrame 을참조하십시오 .
renderScale : real |
to : point |
선택한 텍스트를 찾을 수 있는 페이지의 왼쪽 상단 모서리에서 픽셀 단위로 표시되는 끝 위치입니다. 예를 들어 사용자가 현재 마우스를 드래그하고 있는 위치에서 텍스트 선택을 끝내기 위해 DragHandler 의 centroid.position
에 바인딩할 수 있습니다.
메서드 문서
void clear() |
현재 선택을 지웁니다.
void copyToClipboard() |
text 속성의 일반 텍스트를 시스템 클립보드로 복사합니다.
void selectAll() |
현재 page 의 모든 텍스트를 선택합니다.
© 2025 The Qt Company Ltd. 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.