Skip to content

Commit 0526c5b

Browse files
Be-ingLeonMatthesKDAB
authored andcommitted
cxx-qt-build: update documentation for qrc method
Fixes KDAB#826
1 parent 4978415 commit 0526c5b

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

crates/cxx-qt-build/src/lib.rs

+2-13
Original file line numberDiff line numberDiff line change
@@ -331,26 +331,15 @@ impl CxxQtBuilder {
331331
self
332332
}
333333

334-
/// Generate C++ files from [Qt resource .qrc files](https://doc.qt.io/qt-6/resources.html).
335-
/// The generated file needs to be `#include`d in another .cpp file. For example:
334+
/// Include files listed in a .qrc file into the binary
335+
/// with [Qt's resource system](https://doc.qt.io/qt-6/resources.html).
336336
/// ```no_run
337337
/// # use cxx_qt_build::CxxQtBuilder;
338338
/// CxxQtBuilder::new()
339339
/// .file("src/cxxqt_module.rs")
340340
/// .qrc("src/my_resources.qrc")
341-
/// .cc_builder(|cc| {
342-
/// cc.file("file_with_include.cpp");
343-
/// })
344341
/// .build();
345342
/// ```
346-
///
347-
/// In `file_with_include.cpp`:
348-
/// ```C++
349-
/// #include "my_resources.qrc.cpp"
350-
/// ```
351-
///
352-
/// You also need to [explicitly load](https://doc.qt.io/qt-6/resources.html#explicit-loading-and-unloading-of-embedded-resources)
353-
/// the resources in your .cpp file by calling `qInitResources()` once before starting your application.
354343
pub fn qrc(mut self, qrc_file: impl AsRef<Path>) -> Self {
355344
let qrc_file = qrc_file.as_ref();
356345
self.qrc_files.push(qrc_file.to_path_buf());

0 commit comments

Comments
 (0)