Problem is probably stupid but so far I failed to find what I am doing wrong.

I have in my project these two classes:

Qt Code:
  1. class RegularJobLayout : public QHBoxLayout
  2. {
  3. Q_OBJECT
  4.  
  5. public:
  6. RegularJobLayout(const QString &title, const int index, QWidget *parent = 0);
  7.  
  8. protected slots:
  9. void setPrintSlot();
  10. void setPackSlot();
  11. void setProcessSlot();
  12.  
  13. protected:
  14. void setJobLayout(const QString &title);
  15. void setJobGroupBox(const QString &title);
  16.  
  17. void initializePrintModel();
  18. QStandardItem* initializeTwinItem(QStandardItem *parent);
  19. QStandardItem* initialize3110Item(QStandardItem *parent);
  20. QStandardItem* initializeCPSItem(QStandardItem *parent);
  21.  
  22. void initializePackModel();
  23. QStandardItem* initializePackItem(QStandardItem *parent);
  24.  
  25. QStandardItem* initializePrintPackChildItem(QStandardItem *parent);
  26.  
  27. void initializeProcessingModel();
  28.  
  29. int m_index;
  30.  
  31. QLabel *m_jobNameLabel;
  32. QLineEdit *m_jobNameLineEdit;
  33.  
  34. QLabel *m_userCountLabel;
  35. QSpinBox *m_userCountSpinBox;
  36.  
  37. QLabel *m_duplexLabel;
  38. QComboBox *m_duplexComboBox;
  39.  
  40. QLabel *m_resolutionLabel;
  41. QComboBox *m_resolutionComboBox;
  42.  
  43. QLabel *m_deliveryLabel;
  44. QComboBox *m_deliveryComboBox;
  45.  
  46. QLabel *m_shipmentLabel;
  47. QComboBox *m_shipmentComboBox;
  48.  
  49. QTreeView *m_printTreeView;
  50. QStandardItemModel *m_printItemModel;
  51. QPushButton *m_printButton;
  52.  
  53. QTreeView *m_packTreeView;
  54. QStandardItemModel *m_packItemModel;
  55. QPushButton *m_packButton;
  56.  
  57. QTreeView *m_processingTreeView;
  58. QStandardItemModel *m_processingItemModel;
  59. QPushButton *m_processingButton;
  60.  
  61. QGroupBox *m_jobGroupBox;
  62. QGridLayout *m_jobGroupBoxLayout;
  63.  
  64. QSpacerItem *m_leftJobSpacerItem;
  65. QSpacerItem *m_rightJobSpacerItem;
  66. };
  67.  
  68. class RegularCentralWidget : public QWidget
  69. {
  70. Q_OBJECT
  71.  
  72. public:
  73. RegularCentralWidget(QWidget *parent = 0);
  74.  
  75. protected:
  76. RegularHeaderLayout *m_headerLayout;
  77.  
  78. QList<RegularJobLayout> *m_jobList;
  79.  
  80. QVBoxLayout *m_layout;
  81. };
To copy to clipboard, switch view to plain text mode 

I had five separate RegularJobLayout pointers in my RegularCentralWidget class but decided that this is a more professional approach. Easier to update my code at later time. In the constructor I have the following code:

Qt Code:
  1. RegularCentralWidget::RegularCentralWidget(QWidget *parent) : QWidget(parent)
  2. {
  3. m_headerLayout = new RegularHeaderLayout();
  4.  
  5. m_layout = new QVBoxLayout(this);
  6.  
  7. m_layout->addLayout(m_headerLayout);
  8.  
  9. int index, maxJobs = 5;
  10. QString title;
  11.  
  12. m_jobList = new QList<RegularJobLayout>();
  13.  
  14. for(index = 0; index < maxJobs; ++index)
  15. {
  16. title.setNum(index+1);
  17. title.prepend("Posao ");
  18.  
  19. m_jobList->append(new RegularJobLayout(title, index)); //This line fails
  20.  
  21. m_layout->addLayout(m_jobList[index]); //This line fails
  22. }
  23. }
To copy to clipboard, switch view to plain text mode 

Constructor can probably be better but I am still trying to make it work. I get the following errors:

/home/ivan/Development/Qt/RadniNalog/WorkOrder0.2.3/wouil.cpp:155: error: no matching function for call to ‘QList<telekom::workorder::RegularJobLayout> ::append(telekom::workorder::RegularJobLayout*)â⠂¬â„¢
/usr/include/qt4/QtCore/qlist.h:422: note: candidates are: void QList<T>::append(const T&) [with T = telekom::workorder::RegularJobLayout]
/usr/include/qt4/QtCore/qlist.h:623: note: void QList<T>::append(const QList<T>&) [with T = telekom::workorder::RegularJobLayout]
/home/ivan/Development/Qt/RadniNalog/WorkOrder0.2.3/wouil.cpp:157: error: no matching function for call to ‘QVBoxLayout::addLayout(QList<telekom::worko rder::RegularJobLayout>&)’
/usr/include/qt4/QtGui/qboxlayout.h:86: note: candidates are: void QBoxLayout::addLayout(QLayout*, int)

If somebody would help me to figure out where am I making a mistake I would really appreciate it.

Thanks in advance.