FolderDialog QML Type
기본 폴더 대화상자입니다. 자세히...
Import Statement: | import QtQuick.Dialogs |
Since: | Qt 6.3 |
Inherits: |
속성
- acceptLabel : string
- currentFolder : url
- options : flags
- rejectLabel : string
- selectedFolder : url
상세 설명
FolderDialog 유형은 네이티브 플랫폼 폴더 대화 상자를 위한 QML API를 제공합니다.
폴더 대화 상자를 표시하려면 FolderDialog의 인스턴스를 만들고 원하는 속성을 설정한 다음 open()를 호출합니다. currentFolder 속성은 현재 대화 상자에 표시되는 폴더를 결정하는 데 사용할 수 있습니다. selectedFolder 속성은 대화 상자에서 마지막으로 선택된 폴더를 확인하는 데 사용할 수 있습니다.
MenuItem { text: qsTr("Open...") onTriggered: folderDialog.open() } FolderDialog { id: folderDialog currentFolder: StandardPaths.standardLocations(StandardPaths.PicturesLocation)[0] selectedFolder: viewer.folder } MyViewer { id: viewer folder: folderDialog.selectedFolder }
사용 가능성
기본 플랫폼 폴더 대화 상자는 현재 다음 플랫폼에서 사용할 수 있습니다:
- Android
- iOS
- Linux(GTK+ 플랫폼 테마로 실행하는 경우)
- macOS
- Windows
Qt Quick Dialogs 는 기본 구현을 사용할 수 없는 플랫폼의 경우 Qt Quick 구현을 폴백으로 사용합니다.
FileDialog 및 StandardPaths 을참조하세요 .
속성 문서
acceptLabel : string |
이 속성은 대화 상자를 수락하는 버튼에 표시되는 레이블 텍스트를 보유합니다.
빈 문자열로 설정하면 기본 플랫폼의 기본 레이블이 사용됩니다. 기본 레이블은 일반적으로 Open 입니다.
기본값은 빈 문자열입니다.
rejectLabel 를참조하세요 .
currentFolder : url |
이 속성은 현재 대화 상자에 표시되고 있는 폴더를 보유합니다.
selectedFolder도 참조 하세요.
options : flags |
이 속성에는 대화 상자의 모양과 느낌에 영향을 주는 다양한 옵션이 있습니다.
기본적으로 모든 옵션은 비활성화되어 있습니다.
대화 상자를 표시하기 전에 옵션을 설정해야 합니다. 대화 상자가 표시된 상태에서 옵션을 설정해도 옵션 및 플랫폼에 따라 대화 상자에 즉각적인 영향을 미치지는 않습니다.
사용 가능한 옵션
상수 | 설명 |
---|---|
FolderDialog.DontResolveSymlinks | 폴더 대화 상자에서 심볼 링크를 확인하지 않습니다. 기본적으로 심볼릭 링크가 확인됩니다. |
FolderDialog.ReadOnly | 대화 상자에서 디렉터리 생성을 허용하지 않음을 나타냅니다. |
FolderDialog.DontUseNativeDialog | 대화 상자가 기본이 아닌 빠른 구현을 사용하도록 강제합니다. |
rejectLabel : string |
이 속성은 대화 상자를 거부하는 버튼에 표시되는 레이블 텍스트를 보유합니다.
빈 문자열로 설정하면 기본 플랫폼의 기본 레이블이 사용됩니다. 기본 레이블은 일반적으로 Cancel 입니다.
기본값은 빈 문자열입니다.
acceptLabel 를참조하세요 .
selectedFolder : url |
이 속성은 대화 상자에서 마지막으로 선택한 폴더를 보유합니다.
이 속성의 값은 사용자가 대화 상자에서 폴더를 선택할 때마다 그리고 대화 상자가 수락될 때마다 업데이트됩니다. 또는 accepted() 신호를 처리하여 최종 선택 항목을 가져올 수도 있습니다.
currentFolder 및 accepted()도 참조하세요 .
© 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.