Hi,

I am new to using QT and am in need of some guidence.

I want to create an interface that returns a list of pointers to objects, and then the classes that implement this interface should be able to both set and get the objects in the list.

Where I am getting confused is that I want a general interface that allows me to be able to get any items from any of the derived classes.
I don't understand how I should be handling converting the specialized datatypes like
Qt Code:
  1. QList<newsChannelItem*> items;
To copy to clipboard, switch view to plain text mode 
back via the interface
Qt Code:
  1. QList<QObject*> getItems();
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. class ChannelInterface
  2. {
  3. public:
  4. virtual QList<QObject*> getItems() = 0;
  5. }
To copy to clipboard, switch view to plain text mode 
classes that then implement this interface

Qt Code:
  1. class storeChannel : public QObject, public ChannelInterface
  2. {
  3. QList<storeChannelItem*> items;
  4. public:
  5. QList<QObject*> getItems(); // I want to be able to return a list of storeChannelItem's
  6.  
  7.  
  8. class newsChannel : public QObject, public ChannelInterface
  9. {
  10. QList<newsChannelItem*> items;
  11. public:
  12. QList<QObject*> getItems(); // I want to be able to return a list of newsChannelItem's
To copy to clipboard, switch view to plain text mode 

I appreciate any help on this, as I am pretty stuck.

thanks in advance

Guus Davidson