analitics

Pages

Saturday, July 17, 2021

Python Qt6 : Install and use python with Visual Studio.

Visual Studio is a very good tool for python programming language development.
Today I will show you how to use it with Visual Studio on a Windows operating system.
If you don't have Python install then start the Visual Studio installer and from all presents select the Python development workload.
Start Visual Studio and open a folder or open an empty file and save with the python language-specific extension: py.
Select the Python environment and add the new package with pip tool.
This is the python script I used to test:
import sys
from PyQt6.QtWidgets import QApplication, QWidget

def main():

    app = QApplication(sys.argv)

    w = QWidget()
    w.resize(250, 200)
    w.move(300, 300)

    w.setWindowTitle('Simple')
    w.show()

    sys.exit(app.exec())

if __name__ == '__main__':
    main()
You can see the video tutorial about how you can use it: