Introduce QML-like declarative structure to Python world. Developer writes only pure Python code for QML.

Overview

📝 English documentation is on the way. See Chinese version below.

Declare QtQuick | 声明式 QtQuick 界面库

以全新的方式编写 QtQuick (QML) 界面.

declare-qtquick 支持开发者以纯 Python 语法 + 声明式语法结构编写现代化的界面程序. 它看起来长这样:

from declare_qtquick import Application
from declare_qtquick.widgets import *
from lk_lambdex import lambdex  # pip install lk-lambdex

with Application() as app:

    with Window() as win:
        win.width = 300
        win.height = 400
        win.color = '#F9F0F5'
        win.visible = True
        
        with Rectangle() as rect:
            rect.x = 10
            rect.y = 10
            rect.width = 200
            rect.height = 270
            
            rect.color = 'white'
            rect.radius = 8
    
            rect.width.set_anim(duration=1000)
            rect.height.set_anim(duration=1000)
            
            with Text() as txt:
                txt.anchors.center_in = rect
                txt.text = 'Hello World'
                txt.font.pixel_size = 24
                
            with MouseArea() as area:
                area.anchors.fill = rect
                area.clicked.connect(lambdex('', """
                    rect.width = win.width - 20
                    rect.height = win.height - 20
                """))

    app.start()

运行截图:

FIXME: 下图是示意图, 实际代码仍在开发中.

它等同于以下 QML 代码:

import QtQuick
import QtQuick.Window

Window {
    id: win
    width: 300
    height: 400
    color: '#F9F0F5'
    visible: true
    
    Rectangle {
        id: rect
        x: 10
        y: 10
        width: 200
        height: 270
        
        color: 'white'
        radius: 8
        
        Behavior on width {
            NumberAnimation {
                duration: 1000
            }
        }
        
        Behavior on height {
            NumberAnimation {
                duration: 1000
            }
        }
        
        Text {
            id: txt
            anchors.centerIn: rect
            text: 'Hello World'
            font.pixelSize: 24
        }
        
        MouseArea {
            id: area
            anchors.fill: rect
            onClicked: {
                rect.width = win.width - 20
                rect.height = win.height - 20
            }
        }
    }
}

TODO:More...

Owner
likianta
Hola, I'm likia :) Python programmer work in JLSemi Inc.
likianta
A hotkey manager that runs in the system tray. Uses PySimpleGUI for the GUI and the system tray.

PySimpleHotkey PySimpleHotkey A hotkey manager that runs in the system tray. Uses PySimpleGUI for the GUI and the system tray. Packages Used This proj

PySimpleGUI 20 Nov 14, 2022
An qt asset browser for applications like houdini/nuke/maya/blender

AssetBrowser A qt asset browser for applications like houdini/nuke/maya/blender Currently in development Note: Only houdini plugin available during de

Jonas Sorgenfrei 6 Aug 05, 2022
A simple quiz app using API and GUI

GUI-Quiz-APP It's a simple quiz app using API and GUI.

KALPAK KUMAR DAS 1 Feb 03, 2022
MATE Layouts is a small panel layout switching application for the MATE Desktop.

a small panel layout switching application for the MATE Desktop

Wilbur Wetterquarz 6 Oct 14, 2022
A Minimalistic Backup GUI for your Windows, Mac or Linux

BlobBackup is a minimalistic backup utility for your Windows, Mac or Linux computer. With an excellent engine, extensive storage support, and an easy

283 Nov 30, 2022
A Windows Dock Widget Written In Pure Python

VEПUS A Windows Dock Widget Written In Pure Python What is Venus? Venus is a Dock Widget for your desktops interface. It adds a couple of really cool

Secrets 18 Dec 30, 2022
A GUI panel to manage multi monitor on i3wm.

Monitor manager Only for I3wm (Just for now) It's about two years that I'm using i3 as my window manager and in my experience this window manager allo

Wire.Nemo 3 Nov 06, 2021
Py address book gui - An address book with graphical user interface developed with Python Tkinter

py_address_book_gui An address book with graphical user interface developed with

Milton 4 Feb 01, 2022
QGUI - 0.1MB超轻量Python GUI框架,用模板来快捷制作深度学习模型推理界面

QGUI - 0.1MB超轻量Python GUI框架,用模板来快捷制作深度学习模型推理界面

QPT Family 92 Nov 18, 2022
PyEditor - A Simple Text Editor for python

PyEditor work in progress Text Editor for python Installation git clone https://github.com/ArmenG888/PyEditor Install the libraries Linux or mac pip

ArmenG 3 Mar 15, 2022
A Virtual Desktop Assistant Written in Python

DesktopAssitant A Virtual Desktop Assistant Written in Python. It's generally a basic virtual assistant The basic purpose of this is to make work easi

Technerd Brainiac 597 Dec 31, 2022
The Python-Weather-App is a service that provides weather data

The Python-Weather-App is a service that provides weather data, including current weather data to the developers of web services and mobile applications.

Sayed Tabish 1 Dec 13, 2021
Windows & Linux GUI application to use a Satodime (satodime.io)

Satodime-Tool Licence: LGPL v3 Author: Toporin Language: Python (= 3.6) Homepage: https://github.com/Toporin/Satodime-Tool Introduction What is Satod

4 Dec 16, 2022
A GUI based CRUD database management system built using mysql and python

A GUI based CRUD database management system built using mysql and python

Aquila 2 Feb 13, 2022
A simple one-line quick entry GUI for your Obsidian daily notes in markdown format.

Quick-note-entry-for-Obsidian A simple one-line quick entry GUI for your Obsidian daily notes in markdown format. Log your day quickly with this simpl

Adrian Papineau 22 Oct 04, 2022
Python Web Version 3.0 Using PyQty module

Python-Web-Version-3.0 Python Web Version 3.0 Using PyQty module you have to install pyinstaller module then install PyQt5 module and install PyQtwebE

JehanKandy 9 Jul 13, 2022
Dear PyGui Extensions is a collection of useful tools, abstractions, and simplification layers built with/for Dear PyGui users.

Dear PyGui Extensions: A collection of useful tools, abstractions, and simplification layers built with/for Dear PyGui users.

Jonathan Hoffstadt 34 Jan 01, 2023
Py3editor - A text editor written in Python and Tkinter

Py3Editor My text editor written in Python and Tkinter! Contains a basic set of

JaydenDev 1 Mar 05, 2022
Basic calculator using Tkinter GUI

Basic calculator using Tkinter GUI

Rogerio Penchel 17 Jan 09, 2022
This is the new and improved Plex Automatic Pre-roll script with a GUI

Rollarr This is the new and improved Automatic Pre-roll script with a GUI for Plex now called Rollarr! It should be stable but if you find a bug pleas

164 Nov 04, 2022