Logo Search packages:      
Sourcecode: qt4-x11 version File versions

template<class Key, class T>
Q_INLINE_TEMPLATE QMap< Key, T >::iterator QMap< Key, T >::find ( const Key &  key  )  [inline, inherited]

Returns an iterator pointing to the item with key key in the map.

If the map contains no item with key key, the function returns end().

If the map contains multiple items with key key, this function returns an iterator that points to the most recently inserted value. The other values are accessible by incrementing the iterator. For example, here's some code that iterates over all the items with the same key:

doc/src/snippets/code/src.corelib.tools.qmap.cpp 14

See also:
constFind(), value(), values(), lowerBound(), upperBound(), QMultiMap::find()

Definition at line 559 of file qmap.h.

References QMap< Key, T >::detach().

Referenced by QtWindowListMenu::addWindow(), QtVariantPropertyManager::attributeType(), QtVariantPropertyManager::attributeValue(), QMultiMap< QString, QtSimpleXml * >::constFind(), QtWindowListMenu::eventFilter(), QExtensionFactory::extension(), QMultiMap< QString, QtSimpleXml * >::find(), AddressBook::next(), Q3TextEdit::optimCheckLimit(), AddressBook::previous(), QtWindowListMenu::removeWindow(), QtWindowListMenu::setWindowIcon(), and QDesignerFormWindowManagerInterface::~QDesignerFormWindowManagerInterface().

{
    detach();
    return iterator(findNode(akey));
}


Generated by  Doxygen 1.6.0   Back to index