File tree 1 file changed +2
-13
lines changed
1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -331,26 +331,15 @@ impl CxxQtBuilder {
331
331
self
332
332
}
333
333
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).
336
336
/// ```no_run
337
337
/// # use cxx_qt_build::CxxQtBuilder;
338
338
/// CxxQtBuilder::new()
339
339
/// .file("src/cxxqt_module.rs")
340
340
/// .qrc("src/my_resources.qrc")
341
- /// .cc_builder(|cc| {
342
- /// cc.file("file_with_include.cpp");
343
- /// })
344
341
/// .build();
345
342
/// ```
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.
354
343
pub fn qrc ( mut self , qrc_file : impl AsRef < Path > ) -> Self {
355
344
let qrc_file = qrc_file. as_ref ( ) ;
356
345
self . qrc_files . push ( qrc_file. to_path_buf ( ) ) ;
You can’t perform that action at this time.
0 commit comments