diff options
Diffstat (limited to 'doc/src/snippets/code/doc_src_qcache.qdoc')
-rw-r--r-- | doc/src/snippets/code/doc_src_qcache.qdoc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/src/snippets/code/doc_src_qcache.qdoc b/doc/src/snippets/code/doc_src_qcache.qdoc new file mode 100644 index 0000000..66bda6a --- /dev/null +++ b/doc/src/snippets/code/doc_src_qcache.qdoc @@ -0,0 +1,17 @@ +//! [0] +QCache<int, Employee> cache; +//! [0] + + +//! [1] +Employee *employee = new Employee; +employee->setId(37); +employee->setName("Richard Schmit"); +... +cache.insert(employee->id(), employee); +//! [1] + + +//! [2] +QCache<int, MyDataStructure> cache(5000); +//! [2] |