I have a QTabWidget with four tabs. The only one enabled to start with is the first, called Welcometab.
All tabs are QWidgets, with different content.
The Welcome widget holds som QLabels, with Project-info.
When you press Ctrl+N, you get a dialog where you can fill in Project data. If data are accepted, the are transferred to a QDomDocument and saved. This works fine.
My problem is to transfer the Project data to the labels on the front Tab. How do I do that?
Right now I am trying with friend classes.
Lani is the clas called from main().
I include "welcometab.h" and have and empty declaration of the Welcometab class. In the Welcometab class I declare Lani as a friend. Is this not right?
From Lani.h:
Qt Code:
  1. #include "welcometab.h"
  2. class WelcomeTab;
  3. class Lani : public QWidget
  4. {
  5. Q_OBJECT
To copy to clipboard, switch view to plain text mode 
from welcometab.h:
Qt Code:
  1. class WelcomeTab : public QWidget
  2. {
  3. Q_OBJECT
  4. public:
  5. explicit WelcomeTab(QWidget *parent = 0);
  6.  
  7. friend class Lani;
To copy to clipboard, switch view to plain text mode 
I hope you can help. Thank You!

David