Hi,

I am converting a Qt3 App to Qt4 (Qt4.7.1).


I have a class:
Qt Code:
  1. class AbstractThing : public QPushButton
To copy to clipboard, switch view to plain text mode 

In Qt3 I had a
Qt Code:
  1. class NodeManager : public QObject, QPtrList<AbstractThing>
To copy to clipboard, switch view to plain text mode 

I have converted this in Qt4 to
Qt Code:
  1. class NodeManager : public QObject, QList<AbstractThing*>
To copy to clipboard, switch view to plain text mode 


I have a function in NodeManager that looks at the items in the QList, in Qt3 I had
Qt Code:
  1. void NodeManager::doStuff()
  2.  
  3. AbstractThing *thing;
  4.  
  5. for(thing = first(); thing; thing = next())
  6. {
  7. //stuff
  8. }
To copy to clipboard, switch view to plain text mode 


In Qt4 next() is no longer in Qlist so i have decided to use a QListIterator

Qt Code:
  1. QListIterator<AbstractThing *> it();
  2.  
  3. AbstractThing *thing = first();
  4.  
  5. while (it.hasNext())
  6. {
  7. thing.setDown(false)
  8. }
To copy to clipboard, switch view to plain text mode 

But what do i put in the empty ()? I can't put 'this'


Or will i be better doing a count on the list and a for(int i = 0 .... with item.at(i) etc...


Thank you
Tara