Hi,
on Wednesday 04 November 2009 tonyb wrote:
> In Qt3, how does one traverse a QValueListIterator in reverse? It doesn't
> provide the toBack(), atFirst() functions like QPtrListIterator (and
> QListIterator in Qt4)!!
I've done this somewhere in the code but can't remember where. Now it's too
big :)
You could try this:
QValueList<xxx> list;
QValueList<xxx>::const_iterator it;
it = list.end();
if(list.count() > 0) {
do {
--it; // decrement prior to using the iterator
// do whatever you need to do here
} while(it != list.begin());
}
Hope I remembered this correctly. No guarantee that the syntax is correct :)
--
Regards
Thomas Baumgart
GPG-FP: E55E D592 F45F 116B 8429 4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
Please avoid sending me Word or PowerPoint attachments.
See
http://www.gnu.org/philosophy/no-word-attachments.html-------------------------------------------------------------
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.
http://p.sf.net/sfu/bobj-july_______________________________________________
KMyMoney2-developer mailing list
KMyMoney2-developer@...
https://lists.sourceforge.net/lists/listinfo/kmymoney2-developer