#qt #qt-core #qt-gui

sys qttypes

Manually maintained buildings for Qt value types

10 releases

0.2.9 Jun 17, 2023
0.2.8 Feb 25, 2022
0.2.6 Nov 19, 2021
0.2.4 Sep 30, 2021
0.2.0 Apr 21, 2021

#127 in Date and time

Download history 1822/week @ 2023-06-01 1216/week @ 2023-06-08 2256/week @ 2023-06-15 2239/week @ 2023-06-22 1779/week @ 2023-06-29 2370/week @ 2023-07-06 1609/week @ 2023-07-13 3365/week @ 2023-07-20 4622/week @ 2023-07-27 4228/week @ 2023-08-03 4973/week @ 2023-08-10 4033/week @ 2023-08-17 1625/week @ 2023-08-24 1420/week @ 2023-08-31 1732/week @ 2023-09-07 1477/week @ 2023-09-14

6,551 downloads per month
Used in 219 crates (7 directly)

MIT license

145KB
3K 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

~1–2.3MB
~43K SLoC