Hi,

I want to append line in textBrowser in one of my forms in application, but I can't simply type myForm[index]->m_ui->textBrowser->append(textToSet) because I get compile error mainwindow.cpp:109: error: invalid use of incomplete type ‘struct Ui::Form’
form.h:7: error: forward declaration of ‘struct Ui::Form’

here is form.h code:
Qt Code:
  1. #ifndef FORM_H
  2. #define FORM_H
  3.  
  4. #include <QtGui/QWidget>
  5.  
  6. namespace Ui {
  7. class Form;
  8. }
  9.  
  10. class Form : public QWidget {
  11. Q_OBJECT
  12. Q_DISABLE_COPY(Form)
  13. public:
  14. explicit Form(QWidget *parent = 0);
  15. virtual ~Form();
  16. int userid;
  17. QString user_name;
  18. QString textToShow;
  19.  
  20. public:
  21. virtual void changeEvent(QEvent *e);
  22.  
  23. public:
  24. Ui::Form *m_ui;
  25.  
  26. public slots:
  27. void on_pushButton_clicked();
  28. };
  29.  
  30. #endif // FORM_H
To copy to clipboard, switch view to plain text mode 

I spent lot of time trying to fix it but I could not find the reason.