Reddit 예시
OAuth 2를 사용하여 Reddit에 액세스하는 인증 과정을 보여줍니다.

이 Reddit 예제는 Qt Network Authorization에서 지원하는 OAuth 2를 사용하여 Reddit에 로그인하고, 인증된 사용자와 관련된 Reddit 게시물(텍스트 형식)을 표시합니다.
이 예제를 사용하려면 Reddit의 소비자 키가 필요합니다. 애플리케이션을 등록하려면 https://www.reddit.com/prefs/apps/을 방문하십시오.
참고: 애플리케이션을 생성할 때 ‘설 치형 앱(installed app ) ’을선택하십시오 .
참고: Reddit 설정에서 리디렉션 URI를 http://localhost:1337/ 로설정하십시오 .
예제 실행
다음에서 예제를 실행할 수 있습니다.
- Qt Creator
Welcome 모드를 열고 Examples 에서 예제를 선택하십시오. 자세한 내용은 Qt Creator 의 ‘튜토리얼: 빌드 및 실행’을 참조하십시오.
- Qt Extension for Visual Studio Code
Command Palette 에서 Qt: Open Qt examples 명령을 실행하고 목록에서 예제를 선택합니다. 자세한 내용은 Qt Extension for Visual Studio Code: 튜토리얼: 빌드 및 실행을 참조하십시오.
실행하기 전에, --client-id 를 실행 파일 명령줄에 추가하고, 그 뒤에 https://www.reddit.com/prefs/apps/에서 확인한 소비자 키를 입력하십시오.
© 2026 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.