franco.amato
20th January 2011, 15:30
Hi to all,
in my program I need to use a QList<MyStructure *> list, so I declared one in the private section of my class. I also need a method to get it ( a reference to it ).
This is some code:
struct ScanRec;
class VistaIrisMatching : public QDialog
{
Q_OBJECT
public:
VistaIrisMatching(QWidget *parent = 0, Qt::WFlags flags = 0);
~VistaIrisMatching();
Ui::VistaIrisMatchingClass ui;
m_scanRecList& getScanRecList(); // <------ get a reference to the list
public slots:
void onUpdateDisplay( IplImage* );
bool onLoadDBRecords();
private:
CVistaCamera* m_vistaCamera;
QSqlDatabase IrisDB;
QTimer* m_timer;
QList<ScanRec *> m_scanRecList; // <------- the list
};
I don't understand why it doesn't compile and the compiler says that the error is in the
m_scanRecList& getScanRecList();
Where am I wrong?
Best Regards
in my program I need to use a QList<MyStructure *> list, so I declared one in the private section of my class. I also need a method to get it ( a reference to it ).
This is some code:
struct ScanRec;
class VistaIrisMatching : public QDialog
{
Q_OBJECT
public:
VistaIrisMatching(QWidget *parent = 0, Qt::WFlags flags = 0);
~VistaIrisMatching();
Ui::VistaIrisMatchingClass ui;
m_scanRecList& getScanRecList(); // <------ get a reference to the list
public slots:
void onUpdateDisplay( IplImage* );
bool onLoadDBRecords();
private:
CVistaCamera* m_vistaCamera;
QSqlDatabase IrisDB;
QTimer* m_timer;
QList<ScanRec *> m_scanRecList; // <------- the list
};
I don't understand why it doesn't compile and the compiler says that the error is in the
m_scanRecList& getScanRecList();
Where am I wrong?
Best Regards