#qt #generated-bindings #api-bindings #qt-gui #qt-core

sys qttypes

Manually maintained buildings for Qt value types

13 releases

0.2.12 Oct 22, 2024
0.2.11 Nov 3, 2023
0.2.9 Jun 17, 2023
0.2.8 Feb 25, 2022
0.2.2 Jun 28, 2021

#433 in GUI

Download history 9749/week @ 2024-07-21 9264/week @ 2024-07-28 9305/week @ 2024-08-04 10431/week @ 2024-08-11 11369/week @ 2024-08-18 10562/week @ 2024-08-25 11667/week @ 2024-09-01 10255/week @ 2024-09-08 11659/week @ 2024-09-15 12373/week @ 2024-09-22 12955/week @ 2024-09-29 11250/week @ 2024-10-06 10973/week @ 2024-10-13 14807/week @ 2024-10-20 12788/week @ 2024-10-27 15384/week @ 2024-11-03

54,364 downloads per month
Used in 218 crates (7 directly)

MIT license

155KB
3.5K SLoC

qttypes

This crate contains manually generated bindings to Qt basic value types. It is meant to be used by other crates, such as the qmetaobject crate which re-expose them

The Qt types are basically exposed using the cpp crate. They have manually writen rust idiomatic API which expose the C++ API. These types are the direct equivalent of the Qt types and are exposed on the stack.

In addition, the build script of this crate expose some metadata to downstream crate that also want to use Qt's C++ API:

  • DEP_QT_VERSION: The Qt version as given by qmake
  • DEP_QT_INCLUDE_PATH: The include directory to give to the cpp_build crate to locate the Qt headers
  • DEP_QT_LIBRARY_PATH: The path containing the Qt libraries.

See the crate documentation for more info.

Philosophy

The goal of this crate is to expose a idiomatic Qt API for the core value type classes. The API is manually generated to expose required feature in the most rust-like API, while still keeping the similarities with the Qt API itself.

It is not meant to expose all of the Qt API exhaustively, but only the part which is relevant for the usage in other crate. If you see a feature missing, feel free to write a issue or a pull request.

Note that this crate concentrate on the value types, not the widgets or the the QObject. For that, there is the qmetaobject crate.

Dependencies

~0.9–2.4MB
~44K SLoC