Hi All

 

QMultiHash<Qstring,int>hh;

I need to find some key and change their values.

I found If I use QmutableHashIterator<Qstring,int>it , its 

bool

findNext ( const T & value )

Its parameter is a value, not a key.

So I need to :

While(it.hasNext())

{

It.next();

If(it.key() == ikey)

{

It.setValue(ivalue);
}

}

 

I must to check every item? Who have a better method?

 

2. Qhash:

Some books said Qhash is unorderred?

But I test it.

Qhash<Qstring,int>hh;

I insert some string, and loop the hash by QhashIterator, I found the string is 
orderred.

And I test it Qhash<int,Qstring>, and print key, and found they still orderred.

Why books said it is unorderred?

 

 

Thanks

ken

 

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to