Language Bindings: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
m (Zig lang binding)
Line 1: Line 1:
{{LangSwitch}}
{{LangSwitch}}


== Programming Language Support & Language Bindings ==
==Programming Language Support & Language Bindings==


The Qt API is implemented in C++, and provides additional features for easier cross-platform development. QML – introduced with Qt Quick is a CSS and JavaScript-like declarative, language designed to describe the user interface of a program: both what it looks like, and how it behaves.  
The Qt API is implemented in C++, and provides additional features for easier cross-platform development. QML – introduced with Qt Quick is a CSS and JavaScript-like declarative, language designed to describe the user interface of a program: both what it looks like, and how it behaves.  
Line 7: Line 7:
Officially, only the Python bindings are being maintained by the project, under the name of [https://pyside.org Qt for Python].
Officially, only the Python bindings are being maintained by the project, under the name of [https://pyside.org Qt for Python].


== C++ Development with Qt ==
==C++ Development with Qt==


Qt provides an intuitive C++ class library with a rich set of application build blocks for C++ development. Qt goes beyond C++ in the areas of inter-object communication and flexibility for advanced GUI development. Qt adds the following features to C++'':''
Qt provides an intuitive C++ class library with a rich set of application build blocks for C++ development. Qt goes beyond C++ in the areas of inter-object communication and flexibility for advanced GUI development. Qt adds the following features to C++'':''


* Powerful mechanism for inter-object communication called [https://doc.qt.io/qt-5/signalsandslots.html signals and slots]
*Powerful mechanism for inter-object communication called [https://doc.qt.io/qt-5/signalsandslots.html signals and slots]
* Queryable and designable [https://doc.qt.io/qt-5/properties.html#qt-s-property-system object properties]
*Queryable and designable [https://doc.qt.io/qt-5/properties.html#qt-s-property-system object properties]
* Powerful [https://doc.qt.io/qt-5/eventsandfilters.html events and events filters]
*Powerful [https://doc.qt.io/qt-5/eventsandfilters.html events and events filters]
* Contextual [https://doc.qt.io/qt-5/i18n.html string translation for internationalization]
*Contextual [https://doc.qt.io/qt-5/i18n.html string translation for internationalization]
* Sophisticated interval driven [https://doc.qt.io/qt-5/timers.html timers] that make it possible to elegantly integrate many tasks in an event-driven GUI
*Sophisticated interval driven [https://doc.qt.io/qt-5/timers.html timers] that make it possible to elegantly integrate many tasks in an event-driven GUI
* Hierarchical and queryable [https://doc.qt.io/qt-5/objecttrees.html object trees] that organize object ownership in a natural way
*Hierarchical and queryable [https://doc.qt.io/qt-5/objecttrees.html object trees] that organize object ownership in a natural way
* [https://doc.qt.io/qt-5/qpointer.html Guarded pointers] that are automatically set to 0 when the referenced object is destroyed, unlike normal C++ pointers which become dangling pointers when their objects are destroyed
*[https://doc.qt.io/qt-5/qpointer.html Guarded pointers] that are automatically set to 0 when the referenced object is destroyed, unlike normal C++ pointers which become dangling pointers when their objects are destroyed
* A [https://doc.qt.io/qt-5/metaobjects.html dynamic cast] works across library boundaries.
*A [https://doc.qt.io/qt-5/metaobjects.html dynamic cast] works across library boundaries.


== QML Development with Qt Quick ==
==QML Development with Qt Quick==


QML is a declarative, JavaScript-based language designed to describe the user interface of a program: both what it looks like, and how it behaves. In QML, a user interface is specified as a tree of objects with properties, like in JSON.
QML is a declarative, JavaScript-based language designed to describe the user interface of a program: both what it looks like, and how it behaves. In QML, a user interface is specified as a tree of objects with properties, like in JSON.


* JavaScript, HTML and CSS skills can be used to code complete apps
*JavaScript, HTML and CSS skills can be used to code complete apps
* Optimized for touch-based, animated mobile UIs
*Optimized for touch-based, animated mobile UIs
* Includes a set of graphical and behavioral building blocks: [http://doc.qt.io/qt-5/qmltypes.html QML Types]
*Includes a set of graphical and behavioral building blocks: [http://doc.qt.io/qt-5/qmltypes.html QML Types]
* No C++ knowledge required for UI creation, while it can be extended with C++
*No C++ knowledge required for UI creation, while it can be extended with C++


[http://doc.qt.io/qt-5/qtquick-index.html Find out more about Qt Quick]
[http://doc.qt.io/qt-5/qtquick-index.html Find out more about Qt Quick]


== Qt for Python ==
==Qt for Python==


The ''Qt for Python'' project provides the '''PySide2''' module allowing users to develop Qt and QML application easily from Python.
The ''Qt for Python'' project provides the '''PySide2''' module allowing users to develop Qt and QML application easily from Python.


* You can find more information for the project, which is currently available as a Technical Preview, in the [https://wiki.qt.io/PySide2 wiki page].
*You can find more information for the project, which is currently available as a Technical Preview, in the [https://wiki.qt.io/PySide2 wiki page].
* Compatible with Qt 5.11, and Python 2.7 and 3.5+.
*Compatible with Qt 5.11, and Python 2.7 and 3.5+.


Qt for Python (PySide2) is the official set of Python wheels that The Qt Company provides.
Qt for Python (PySide2) is the official set of Python wheels that The Qt Company provides.
Line 42: Line 42:
[https://www.qt.io/qt-for-python Find out more about Qt for Python]
[https://www.qt.io/qt-for-python Find out more about Qt for Python]


== These are third party language bindings for Qt ==
==These are third party language bindings for Qt==


=== [http://www.riverbankcomputing.com/news Qt for Python] (PyQt) ===
===[http://www.riverbankcomputing.com/news Qt for Python] (PyQt)===


(PyQt is developed by [http://www.riverbankcomputing.com/ Riverbank Computing], not to be confused with [https://pyside.org Qt for Python (PySide)] from TQtC)
(PyQt is developed by [http://www.riverbankcomputing.com/ Riverbank Computing], not to be confused with [https://pyside.org Qt for Python (PySide)] from TQtC)


* [https://wiki.python.org/moin/PyQt/Tutorials Tutorials]
*[https://wiki.python.org/moin/PyQt/Tutorials Tutorials]
* [http://pyqt.sourceforge.net/Docs/PyQt5/index.html Reference Guide (PyQt5)]
*[http://pyqt.sourceforge.net/Docs/PyQt5/index.html Reference Guide (PyQt5)]
* [http://pyqt.sourceforge.net/Docs/PyQt5/class_reference.html API Documentation (PyQt5)]
*[http://pyqt.sourceforge.net/Docs/PyQt5/class_reference.html API Documentation (PyQt5)]
* [http://www.qtrac.eu/pyqtbook.html Book]
*[http://www.qtrac.eu/pyqtbook.html Book]
* [http://www.riverbankcomputing.com/software/pyqt/whitepaper Whitepaper]
*[http://www.riverbankcomputing.com/software/pyqt/whitepaper Whitepaper]


=== [http://ring-lang.sourceforge.net/doc/qt.html Qt for Ring] (RingQt) ===
===[http://ring-lang.sourceforge.net/doc/qt.html Qt for Ring] (RingQt)===


RingQt is a binding of the Qt framework to the [http://ring-lang.net/ Ring programming language.]
RingQt is a binding of the Qt framework to the [http://ring-lang.net/ Ring programming language.]
Line 60: Line 60:
Ring uses Qt as its toolkit to provide cross-platform abilities.
Ring uses Qt as its toolkit to provide cross-platform abilities.


=== [https://github.com/OmixVisualization/qtjambi5/ Qt for Java] (QtJambi5) ===
===[https://github.com/OmixVisualization/qtjambi5/ Qt for Java] (QtJambi5)===
QtJambi is Qt bindings for the Java programming language originally developed by Trolltech, the predecessor of The Qt Company.
QtJambi is Qt bindings for the Java programming language originally developed by Trolltech, the predecessor of The Qt Company.


The QtJambi5 project provides these bindings for the latest Qt5 releases and Java JDK versions.
The QtJambi5 project provides these bindings for the latest Qt5 releases and Java JDK versions.
* [https://github.com/OmixVisualization/qtjambi5/ Project on Github]
* [https://github.com/OmixVisualization/qtjambi5/wiki Introduction]
* [https://www.omix-visualization.com/qtjambidocs API Documentation]


=== [https://github.com/rust-qt Qt for Rust] (Rust-Qt) ===
*[https://github.com/OmixVisualization/qtjambi5/ Project on Github]
*[https://github.com/OmixVisualization/qtjambi5/wiki Introduction]
*[https://www.omix-visualization.com/qtjambidocs API Documentation]
 
===[https://github.com/rust-qt Qt for Rust] (Rust-Qt)===


Qt bindings for the Rust language
Qt bindings for the Rust language


* [https://github.com/rust-qt Project on Github]  
*[https://github.com/rust-qt Project on Github]
 
===[https://github.com/White-Oak/qml-rust Qt Quick for Rust] (qml-rust)===


=== [https://github.com/White-Oak/qml-rust Qt Quick for Rust] (qml-rust) ===
*QML bindings for the Rust language
*QML bindings for the Rust language
**[https://github.com/White-Oak/qml-rust Project on Github]


** [https://github.com/White-Oak/qml-rust Project on Github]  
===[https://github.com/flanfly/qmlrs Qt Quick for Rust] (qmlrs)===


=== [https://github.com/flanfly/qmlrs Qt Quick for Rust] (qmlrs) ===
*QML bindings for the Rust language
*QML bindings for the Rust language
** [https://github.com/flanfly/qmlrs Project on Github]
**[https://github.com/flanfly/qmlrs Project on Github]
 
=== '''[https://github.com/kassane/qml_zig Qt Quick for Zig] (qml_zig)''' ===
 
*QML bindings for the Zig language
*
*
 
=== [https://github.com/vesim987/zqml Qt Quick for Zig] (zqml) ===
 
* QML bindings for the Zig language
 
===[https://github.com/Papierkorb/qt5.cr Qt for Crystal]  (qt5.cr)===


=== [https://github.com/Papierkorb/qt5.cr Qt for Crystal]  (qt5.cr) ===
*QML bindings for the Crystal language
*QML bindings for the Crystal language


=== [https://github.com/therecipe/qt Qt for Go] (qt) ===
===[https://github.com/therecipe/qt Qt for Go] (qt)===
 
*Qt bindings for Go language
*Qt bindings for Go language
**[https://github.com/therecipe/qt Project on Github]


** [https://github.com/therecipe/qt Project on Github]
===[https://github.com/bytedeco/javacpp-presets/tree/master/qt Qt for Java] (javacpp-presets)===


=== [https://github.com/bytedeco/javacpp-presets/tree/master/qt Qt for Java] (javacpp-presets) ===
*Qt bindings for Java
*Qt bindings for Java


=== [https://gitlab.com/ddobrev/QtSharp Qt for C#/Mono/.Net] (QtSharp) ===
===[https://gitlab.com/ddobrev/QtSharp Qt for C#/Mono/.Net] (QtSharp)===


This project aims to create Mono/.NET libraries that wrap Qt thus enabling its usage through C#. It relies on the excellent CppSharp.
This project aims to create Mono/.NET libraries that wrap Qt thus enabling its usage through C#. It relies on the excellent CppSharp.


=== [https://github.com/pauldotknopf/Qml.Net Qt for C#/Mono/.Net] (Qml.Net) ===
===[https://github.com/pauldotknopf/Qml.Net Qt for C#/Mono/.Net] (Qml.Net)===
Qml.Net is cross-platform integration of Qml/QtQuick for .NET Core/.NET Framework/Mono. It is a binding that brings .NET types into JavaScript with full interoperability.
Qml.Net is cross-platform integration of Qml/QtQuick for .NET Core/.NET Framework/Mono. It is a binding that brings .NET types into JavaScript with full interoperability.
=== [https://github.com/MGWL/QtE5 Qt for D] (QtE5) ===
===[https://github.com/MGWL/QtE5 Qt for D] (QtE5)===


QtE5 is a binding of the Qt framework to the [https://dlang.org/ D programming language version 2.]
QtE5 is a binding of the Qt framework to the [https://dlang.org/ D programming language version 2.]


=== [http://www.isptech.co.uk/qtHaskell/index.html Qt for Haskell] (qtHaskell) ===
===[http://www.isptech.co.uk/qtHaskell/index.html Qt for Haskell] (qtHaskell)===
The qtHaskell project provides a comprehensive set of Haskell bindings for 50 Qt modules with extensive examples and demo programs including qtHaskell versions of Tetrix, DiagramScene, PathDeform and the Qt Asteroids game which uses FRP (Functional Reactive Programming) techniques to control game states and behaviors.
The qtHaskell project provides a comprehensive set of Haskell bindings for 50 Qt modules with extensive examples and demo programs including qtHaskell versions of Tetrix, DiagramScene, PathDeform and the Qt Asteroids game which uses FRP (Functional Reactive Programming) techniques to control game states and behaviors.


=== [https://khumba.net/projects/qtah/ Qtah] ===
===[https://khumba.net/projects/qtah/ Qtah]===


The qtah project provides a set of Haskell bindings for Qt.  
The qtah project provides a set of Haskell bindings for Qt.  


** [https://gitlab.com/khumba/qtah Source code and build instructions]
**[https://gitlab.com/khumba/qtah Source code and build instructions]


=== [https://github.com/barche/QML.jl Qt for Julia] (QML.jl) ===
===[https://github.com/barche/QML.jl Qt for Julia] (QML.jl)===
This project provides bindings to Julia.
This project provides bindings to Julia.


=== [http://www.gekkou.co.uk/software/hsqml/ Qt Quick for Haskell] (HsQML) ===
===[http://www.gekkou.co.uk/software/hsqml/ Qt Quick for Haskell] (HsQML)===


HsQML provides a Haskell binding to the Qt Quick framework. It allows you to write graphical applications where the front-end is written in Qt Quick's QML language (incorporating JavaScript) and the back-end is written in Haskell.
HsQML provides a Haskell binding to the Qt Quick framework. It allows you to write graphical applications where the front-end is written in Qt Quick's QML language (incorporating JavaScript) and the back-end is written in Haskell.


=== [https://github.com/Kakadu/lablqml Qt Quick for OCaml] (lablqml) ===
===[https://github.com/Kakadu/lablqml Qt Quick for OCaml] (lablqml)===


QML Bindings to OCaml.  
QML Bindings to OCaml.  


=== [https://github.com/nodegui/nodegui Node.js and Qt Widgets] (NodeGui) ===
===[https://github.com/nodegui/nodegui Node.js and Qt Widgets] (NodeGui)===
Build performant, native and cross-platform desktop applications with '''Node.js''' and '''CSS like styling'''.  NodeGUI is powered by Qt Widgets  which makes it CPU and memory efficient as compared to other chromium based solutions like electron.  
Build performant, native and cross-platform desktop applications with '''Node.js''' and '''CSS like styling'''.  NodeGUI is powered by Qt Widgets  which makes it CPU and memory efficient as compared to other chromium based solutions like electron.  


=== [https://github.com/BrigJS/brig Qt Quick for Node.js] (Brig) ===
===[https://github.com/BrigJS/brig Qt Quick for Node.js] (Brig)===
Qt Quick: The Brig project provides library for Qt Quick framework, making it possible to write graphical applications in JavaScript and QML languages.
Qt Quick: The Brig project provides library for Qt Quick framework, making it possible to write graphical applications in JavaScript and QML languages.


=== [https://github.com/Nelson-numerical-software/nelson QML bindings for Nelson language] ===
===[https://github.com/Nelson-numerical-software/nelson QML bindings for Nelson language]===
Nelson is an array programming language providing a powerful open computing environment for engineering and scientific applications using modern C/C++ libraries and others state of art numerical libraries.
Nelson is an array programming language providing a powerful open computing environment for engineering and scientific applications using modern C/C++ libraries and others state of art numerical libraries.


The QML engine enables nelson programs to display and manipulate graphical content using Qt's QML framework.
The QML engine enables nelson programs to display and manipulate graphical content using Qt's QML framework.
see some examples: https://www.youtube.com/watch?time_continue=1&v=L3fsg4zhTjE
see some examples: https://www.youtube.com/watch?time_continue=1&v=L3fsg4zhTjE

Revision as of 14:59, 30 December 2020

En Ar Bg De El Es Fa Fi Fr Hi Hu It Ja Kn Ko Ms Nl Pl Pt Ru Sq Th Tr Uk Zh

Programming Language Support & Language Bindings

The Qt API is implemented in C++, and provides additional features for easier cross-platform development. QML – introduced with Qt Quick is a CSS and JavaScript-like declarative, language designed to describe the user interface of a program: both what it looks like, and how it behaves. Bindings to Qt exist for several other languages, including Python, Ring, Go, Rust, PHP, and Java™. Officially, only the Python bindings are being maintained by the project, under the name of Qt for Python.

C++ Development with Qt

Qt provides an intuitive C++ class library with a rich set of application build blocks for C++ development. Qt goes beyond C++ in the areas of inter-object communication and flexibility for advanced GUI development. Qt adds the following features to C++:

QML Development with Qt Quick

QML is a declarative, JavaScript-based language designed to describe the user interface of a program: both what it looks like, and how it behaves. In QML, a user interface is specified as a tree of objects with properties, like in JSON.

  • JavaScript, HTML and CSS skills can be used to code complete apps
  • Optimized for touch-based, animated mobile UIs
  • Includes a set of graphical and behavioral building blocks: QML Types
  • No C++ knowledge required for UI creation, while it can be extended with C++

Find out more about Qt Quick

Qt for Python

The Qt for Python project provides the PySide2 module allowing users to develop Qt and QML application easily from Python.

  • You can find more information for the project, which is currently available as a Technical Preview, in the wiki page.
  • Compatible with Qt 5.11, and Python 2.7 and 3.5+.

Qt for Python (PySide2) is the official set of Python wheels that The Qt Company provides.

Find out more about Qt for Python

These are third party language bindings for Qt

Qt for Python (PyQt)

(PyQt is developed by Riverbank Computing, not to be confused with Qt for Python (PySide) from TQtC)

Qt for Ring (RingQt)

RingQt is a binding of the Qt framework to the Ring programming language.

Ring uses Qt as its toolkit to provide cross-platform abilities.

Qt for Java (QtJambi5)

QtJambi is Qt bindings for the Java programming language originally developed by Trolltech, the predecessor of The Qt Company.

The QtJambi5 project provides these bindings for the latest Qt5 releases and Java JDK versions.

Qt for Rust (Rust-Qt)

Qt bindings for the Rust language

Qt Quick for Rust (qml-rust)

Qt Quick for Rust (qmlrs)

Qt Quick for Zig (qml_zig)

  • QML bindings for the Zig language

Qt Quick for Zig (zqml)

  • QML bindings for the Zig language

Qt for Crystal (qt5.cr)

  • QML bindings for the Crystal language

Qt for Go (qt)

Qt for Java (javacpp-presets)

  • Qt bindings for Java

Qt for C#/Mono/.Net (QtSharp)

This project aims to create Mono/.NET libraries that wrap Qt thus enabling its usage through C#. It relies on the excellent CppSharp.

Qt for C#/Mono/.Net (Qml.Net)

Qml.Net is cross-platform integration of Qml/QtQuick for .NET Core/.NET Framework/Mono. It is a binding that brings .NET types into JavaScript with full interoperability.

Qt for D (QtE5)

QtE5 is a binding of the Qt framework to the D programming language version 2.

Qt for Haskell (qtHaskell)

The qtHaskell project provides a comprehensive set of Haskell bindings for 50 Qt modules with extensive examples and demo programs including qtHaskell versions of Tetrix, DiagramScene, PathDeform and the Qt Asteroids game which uses FRP (Functional Reactive Programming) techniques to control game states and behaviors.

Qtah

The qtah project provides a set of Haskell bindings for Qt.

Qt for Julia (QML.jl)

This project provides bindings to Julia.

Qt Quick for Haskell (HsQML)

HsQML provides a Haskell binding to the Qt Quick framework. It allows you to write graphical applications where the front-end is written in Qt Quick's QML language (incorporating JavaScript) and the back-end is written in Haskell.

Qt Quick for OCaml (lablqml)

QML Bindings to OCaml.

Node.js and Qt Widgets (NodeGui)

Build performant, native and cross-platform desktop applications with Node.js and CSS like styling. NodeGUI is powered by Qt Widgets which makes it CPU and memory efficient as compared to other chromium based solutions like electron.

Qt Quick for Node.js (Brig)

Qt Quick: The Brig project provides library for Qt Quick framework, making it possible to write graphical applications in JavaScript and QML languages.

QML bindings for Nelson language

Nelson is an array programming language providing a powerful open computing environment for engineering and scientific applications using modern C/C++ libraries and others state of art numerical libraries.

The QML engine enables nelson programs to display and manipulate graphical content using Qt's QML framework. see some examples: https://www.youtube.com/watch?time_continue=1&v=L3fsg4zhTjE