Esempio Reddit
Mostra come effettuare l'autenticazione con OAuth 2 per accedere a Reddit.

L'esempio Reddit utilizza OAuth 2, supportato dall'autorizzazionQt Network , per effettuare l'accesso a Reddit e visualizzare i post di Reddit (in formato testo) associati all'utente autenticato.
Per utilizzare questo esempio, è necessaria una chiave consumer fornita da Reddit. Per registrare l'applicazione, visitare https://www.reddit.com/prefs/apps/.
Nota: quando si crea l’applicazione,selezionare “app installata ”.
Nota: nelle impostazioni di Reddit,imposta l’URI di reindirizzamento su http://localhost:1337/.
Esecuzione dell’esempio
È possibile eseguire l'esempio da:
- Qt Creator
Aprire la modalità " Welcome " e selezionare l'esempio da Examples. Per ulteriori informazioni, consultare Qt Creator: Tutorial: Build and run.
- Qt Extension for Visual Studio Code
Esegui il comando Qt: Open Qt examples da Command Palette e seleziona l'esempio dall'elenco. Per ulteriori informazioni, consulta Qt Extension for Visual Studio Code: Tutorial: Compilazione ed esecuzione.
Prima dell’avvio, aggiungi --client-id alla riga di comando dell’eseguibile, seguito dalla tua chiave consumer disponibile su 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.