-
Notifications
You must be signed in to change notification settings - Fork 0
1.02
Explanation of the contents of a topic page @ Week 1 Topic 1
Objectives: Adding, iterating, manipulating data in item containers
Comment: Attendees should realise it's totally ok to use standard containers. There are conversion functions between the standard and Qt item containers. The added-value of Qt containers is implicit sharing. It's efficient to take copies of huge containers, as long as the items are not changed, which will result to deep copy. Important learning objective is to do the iteration in the right way: non-mutable with simple range loop for (const ¬eConstRefToMyItem : container) and QMutableXXIterator for mutable iterating. These are typically the fastest ones.
- What are Containers?
- What are the Container classes?
- Is it OK to use standard containers?
- What is the added-value of Qt containers?
- How do I iterate the right way?
- What are assignable types?
- How to iterate containers efficiently (for-range loop + Java-like iterators)?
- How to use algorithms in container manipulation (because Qt algorithms are mostly depicted)?
!NB: The doc.qt.io Container page is pretty exhaustive. We may not need much more than a shorter introductory presentation here.