- Qt 6.4
- Qt Core
- C++ Classes
- QMultiMap
- Qt 6.4.2 Reference Documentation

# Obsolete Members for QMultiMap

The following members of class QMultiMap are deprecated. They are provided to keep old source code working. We strongly advise against using them in new code.

## Public Functions

`(deprecated)` void | insert(const QMultiMap<Key, T> &map)
`(deprecated)` void | insert(QMultiMap<Key, T> &&map)
`(deprecated)` QMultiMap::iterator | insertMulti(const Key &key, const T &value)
`(deprecated)` QMultiMap::iterator | insertMulti(QMultiMap::const_iterator pos, const Key &key, const T &value)
`(deprecated)` std::multimap<Key, T> | toStdMap() const

## Member Function Documentation

### `[since 5.15]` void QMultiMap::insert(const QMultiMap<Key, T> &map)

This function is deprecated. We strongly advise against using it in new code.

Use unite() instead.

Inserts all the items in map into this map.

This function was introduced in Qt 5.15.

### `[since 5.15]` void QMultiMap::insert(QMultiMap<Key, T> &&map)

This function is deprecated. We strongly advise against using it in new code.

Use unite() instead.

This is an overloaded function.

Moves all the items from map into this map.

If map is shared, then the items will be copied instead.

This function was introduced in Qt 5.15.

### QMultiMap::iterator QMultiMap::insertMulti(const Key &key, const T &value)

This function is deprecated. We strongly advise against using it in new code.

Use insert() instead.

Inserts a new item with the key key and a value of value, and returns an iterator pointing to the new item.

### QMultiMap::iterator QMultiMap::insertMulti(QMultiMap::const_iterator pos, const Key &key, const T &value)

This function is deprecated. We strongly advise against using it in new code.

Use insert() instead.

This is an overloaded function.

Inserts a new item with the key key and value value and with hint pos suggesting where to do the insert.

### std::multimap<Key, T> QMultiMap::toStdMap() const

This function is deprecated. We strongly advise against using it in new code.

Use toStdMultiMap() instead.

Returns an STL multi map equivalent to this QMultiMap.