aboutsummaryrefslogtreecommitdiffstats
path: root/doc/codesnippets/doc/src/snippets/code/doc_src_qcache.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/codesnippets/doc/src/snippets/code/doc_src_qcache.qdoc')
-rw-r--r--doc/codesnippets/doc/src/snippets/code/doc_src_qcache.qdoc17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/codesnippets/doc/src/snippets/code/doc_src_qcache.qdoc b/doc/codesnippets/doc/src/snippets/code/doc_src_qcache.qdoc
new file mode 100644
index 000000000..66bda6af9
--- /dev/null
+++ b/doc/codesnippets/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]