@@ -31,10 +31,23 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31
31
//! - `DEP_QT_LIBRARY_PATH`: The path containing the Qt libraries.
32
32
//! - `DEP_QT_FOUND`: set to 1 when qt was found, or 0 if qt was not found and the `mandatory` feature is not set
33
33
//!
34
+ //! ## Philosophy
35
+ //!
36
+ //! The goal of this crate is to expose a idiomatic Qt API for the core value type classes.
37
+ //! The API is manually generated to expose required feature in the most rust-like API, while
38
+ //! still keeping the similarities with the Qt API itself.
39
+ //!
40
+ //! It is not meant to expose all of the Qt API exhaustively, but only the part which is
41
+ //! relevant for the usage in other crate.
42
+ //! If you see a feature missing, feel free to write a issue or a pull request.
43
+ //!
44
+ //! Note that this crate concentrate on the value types, not the widgets or the
45
+ //! the `QObject`. For that, there is the `qmetaobject` crate.
46
+ //!
34
47
//! ## Usage with the `cpp` crate
35
48
//!
36
- //! Here is an example that make use of the types exposed by this crate in combinaition with the `cpp` crate
37
- //! to call native API:
49
+ //! Here is an example that make use of the types exposed by this crate in combinaition
50
+ //! with the [`mod@cpp`] crate to call native API:
38
51
//!
39
52
//! In `Cargo.toml`
40
53
//! ```toml
@@ -44,9 +57,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
44
57
//! cpp = "0.5"
45
58
//! #...
46
59
//! [build-dependencies]
47
- //! cpp_build = "0.5.4 "
60
+ //! cpp_build = "0.5"
48
61
//! ```
49
62
//!
63
+ //! Note: It is importent to depend directly on `qttype`, it is not enough to rely on the
64
+ //! dependency coming transitively from another dependencies, otherwie the `DEP_QT_*`
65
+ //! environment variables won't be defined.
66
+ //!
50
67
//! Then in the `build.rs` file:
51
68
//! ```ignore
52
69
//! fn main() {
@@ -66,14 +83,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
66
83
//! ```
67
84
//!
68
85
//! You will find a small but working example in the
69
- //! [qmetaobject reporisoty](https://github.com/woboq/qmetaobject-rs/tree/master/examples/graph)
86
+ //! [qmetaobject-rs reporisoty](https://github.com/woboq/qmetaobject-rs/tree/master/examples/graph)
87
+ //!
88
+ //! ## Cargo Features
70
89
//!
71
- //! ## Features
72
90
//! - **`mandatory`**: When this feature is enabled (the default), the build script will panic with an error
73
91
//! if Qt is not found. Otherwise, when not enabled, the build will continue, but any use of the classes will
74
92
//! panic at runtime
75
93
//! - **`chrono`**: enable the conversion between [`QDateTime`] related types and the types from the `chrono` crate.
76
- //! - **`qtquick`**, **`qtwebengine`**: link against these modules
94
+ //! - **`qtquick`**, **`qtwebengine`**: link against these Qt modules
95
+ //!
77
96
78
97
#![ cfg_attr( no_qt, allow( unused) ) ]
79
98
0 commit comments