Giter Site home page Giter Site logo

xxr0ss / vscode-qt-for-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from seanwu1105/vscode-qt-for-python

0.0 0.0 0.0 1.67 MB

Qt for Python (PyQt5 and PySide2) extension for Visual Studio Code.

Home Page: https://marketplace.visualstudio.com/items?itemName=seanwu.vscode-qt-for-python

License: MIT License

TypeScript 50.17% Python 23.07% QML 23.70% QMake 3.06%

vscode-qt-for-python's Introduction

Visual Studio Code Extension Qt for Python

build version rating downloads installs Codacy Badge

A Visual Studio Code extension provides some common functionalities for PyQt5, PySide2, PySide6 with Qt Creator.

Qt Markup Language (qml) Qt Style Sheets (qss) Resource Collection Files (qrc)
qml qss qrc
qmake Files (pro) Qt Linguist Translation (qt.ts) QML Module Definition Files (qmldir)
pro qtts qmldir
Qt Markup Language (*.qml) Qt Designer Form (*.ui) Qt Linguist Translation (*.qt.ts)
preview preview preview

Features

  • Qt Markup Language (*.qml) highlighting and snippets support
  • QML Module Definition Files (*.qmldir) highlighting and snippets support
  • Qt Style Sheets (*.qss) highlighting and snippets support
  • Qt Linguist Translation (*.qt.ts) highlighting support (XML)
  • Resource Collection Files (*.qrc) highlighting support (XML)
  • Qt Designer Form (*.ui) highlighting support (XML)
  • Qt Creator User Settings (*.pro.user) highlighting support (XML)
  • qmake highlighting support
  • New form (Qt Designer *.ui file) command
  • Edit form (Qt Designer *.ui file) command
  • Compile form (Qt Designer *.ui file) into Python file (require pyuic5 or pyside2-uic)
  • Update translation (Qt Linguist *.qt.ts file) from Python file (require pylupdate5 or pyside2-lupdate)
  • Edit translation (Qt Linguist *.qt.ts file)
  • Release translation (Qt Linguist *.qt.ts file) to *.qm file
  • Preview QML
  • Compile QRC (Qt Resource File) into Python file (require pyrcc5 or pyside2-rcc)

Supported Environment Variables

The following list shows the supported environment variables you can use for the path of Qt tools in configurations.

Predefined Variables

  • ${workspaceFolder} - the path of the folder opened in VS Code
  • ${workspaceFolderBasename} - the name of the folder opened in VS Code without any slashes (/)
  • ${file} - the current opened file
  • ${relativeFile} - the current opened file relative to workspaceFolder
  • ${fileBasename} - the current opened file's basename
  • ${fileBasenameNoExtension} - the current opened file's basename without file extension
  • ${fileDirname} - the current opened file's dirname
  • ${fileExtname} - the current opened file's extension
  • ${lineNumber} - the current selected line number in the active file
  • ${selectedText} - the current selected text in the active file

The example of predefined variables can be found here.

System Environment Variables

You can also reference environment variables through the ${env:Name} syntax (for example, ${env:USER}).

Be sure to match the environment variable name's casing, for example, ${env:Path} on Windows.

Requirements

This extension requires Qt Designer, Qt Linguist, Qt lrelease and Qt qmlscene for different features. You could install these tools by installing Qt Creator.

After the installation, you could find the tools within the installing folder of Qt Creator in your computer. For example, if you install Qt Creator 5.13.0 in /opt/Qt in Linux, you could find out the binary of these tools in /opt/Qt/5.13.0/gcc_64/bin. Or, for Windows, you could find the binary of the tools in C:\Qt\5.13.0\mingw73_64\bin if you did not change the default path. You have to set the paths of tools in Qt for Python section in user settings of Visual Studio Code before using the commands provided by this extension.

Caveat

  • All file generated by the following command would overwrite the existing files with the same name without warning.

Release Notes

Please see the release notes in CHANGELOG.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.