Nesta página

Configurar o ambiente de desenvolvimento do Python

Com o pacote de extensões Qt for Python, você pode desenvolver Qt for Python aplicativos com o VS Code e o Python:

  • Instale os pacotes do PySide6
  • Crie aplicativos d Qt for Python s com interfaces de usuário baseadas em Qt Quick ou Qt Widgets
  • Compilar, executar e limpar as aplicações
  • Depure os aplicativos com o debugpy e o depurador QML
  • Ler a documentação do Qt for Python

Instale o PySide6 para o projeto

A maneira recomendada de executar projetos PySide6 no VS Code é instalar o PySide6 para cada projeto. A extensão Qt para o VS Code solicita que você faça isso na primeira vez que abrir um arquivo .py de um projeto.

Para instalar o PySide6 para o projeto posteriormente:

  1. Acesse “ Command Palette ” e selecione “ Qt: Install PySide6 ”.
  2. Selecione “ Create environment ” para criar um novo ambiente virtual para o projeto. Para usar um ambiente existente, selecione “ Select environment ”.

Criar ambiente virtual com o uv

Se você instalou o gerenciador de pacotes Python uv e o configurou no PATH, pode usá-lo para criar o ambiente virtual:

  1. Acesse Command Palette e selecione Qt: Create virtual environment with uv.
  2. Selecione “ Create environment ” para criar um novo ambiente virtual para o projeto. Para usar um ambiente existente, selecione “ Select environment ”.

Veja também Instalação, Tutorial: Qt Quick e Qt for Python, Criar projetos Qt, Depurar aplicativos Qt for Python e Ler a documentação do Qt.

© 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.