Skip to main content

Live coding for Python, Qt and QML

Project description

# Live Coding Environment for Python, Qt and QML

![Logo](./src/livecoding/icon.png)

This project provides a live coding environment for Python and Qt.

At the moment this project only support PyQt as Qt for Python bindings. However, PySide (or Python for Qt) support will be added when available.

## Install

To install the live coding environment run:

`bash python setup.py install `

## Use

The live coding environment comes with a live runner which enables your to live code Qt GUIs quickly.

Run following to test drive the example:

`bash python_qt_live_coding examples `

Your will instantly see the example project in the live runner.

![Live Runner Example](./docs/live_runner_example2.png)

Now you can either select the MainScreen.qml file or type MainScreen in the filter.

When you type, the file will be automatically selected.

When loaded you will see following.

![Live Runner Example](./docs/live_runner_example.png)

This is the example GUI inside the live runner.

Now press the Edit button. Your favorite text editor should open promptly.

Edit the code inside the editor und you will see the GUI updates instantly when you save the document.

## Python QML module support

The live coding environment has built in support for Python QML modules.

The idea is to place QML and Python code in the same directory, similar to how you would create a Qt/C++ application. Additionally, with Python we have the advantage of being able to discover modules automatically.

For this purpose add register_qml_types function to the __init__.py of your Python QML module. See the example in [example/module/__init__.py](./example/module/__init__.py).

However, so far automatic reloading of Python code is not support. When you work on a Python module please use the Restart button which restarts the live coding application instead.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-qt-live-coding-0.1.2.tar.gz (5.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page