How do I pay information between a tab widget on a main view form? I have a main view class that has a tab widget, I need to pass fields form line edits form setup tab to my addline tab. For example I have a ui->SetupTabField->text(), and would like to use this in the AddLineItem tab. Thanks for any help, new to QT and C++;

Qt Code:
  1. MainView::MainView(QWidget *parent, SetupTab& setup, AddLineItem& addlineitem) :
  2. QMainWindow(parent),
  3. m_setupTab (setup),
  4. m_addlineitem(addlineitem),
  5. ui(new Ui::MainView)
  6. {
  7. ui->setupUi(this);
  8. m_setupTab.setParent(this);
  9. // auto setup_tab = new SetupTab(this); // Create instance of the class
  10. ui->loSetupTab->addWidget(&m_setupTab);
  11. // auto addlineitem_tab = new AddLineItem(this);
  12. ui->loAddSmallParts->addWidget(&addlineitem);
  13. }
  14.  
  15. void MainView::createActions()
  16. {
  17.  
  18. }
  19.  
  20. MainView::~MainView()
  21. {
  22. delete ui;
  23. }
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. #include <QIcon>
  2. #include <QtNetwork>
  3. #include <QCoreApplication>
  4. #include <QNetworkAccessManager>
  5. #include <QNetworkRequest>
  6. #include <QNetworkReply>
  7. #include <QUrl>
  8. #include <QUrlQuery>
  9.  
  10. static auto RESOURCE_PREFIX = QStringLiteral(":/xml");
  11. static QString FILEERROR_MSG = QStringLiteral("ERROR OPENING FILE");
  12.  
  13. SetupTab::SetupTab(QWidget *parent) :
  14. QWidget(parent),
  15. ui(new Ui::SetupTab)
  16. {
  17. qDebug() << "QWidget SetupTab has been envoked!";
  18. ui->setupUi(this);
  19. //Start: PO generation (fjd 8.5.16 1:46PM)
  20. QString po = "";
  21. Utils *u;
  22. u->createPO(po);
  23. ui->leShipToDealer_PO->setText(po);
  24. //End: PO generation
  25. //AddLineItem* m_newLineItem = new AddLineItem(this);
  26. //m_newLineItem->changeUI();
  27. ReadBaseXMLFile();
  28. }
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. AddLineItem::AddLineItem(QWidget *parent) :
  2. QWidget(parent),
  3. ui(new Ui::AddLineItem)
  4. {
  5. ui->setupUi(this);
  6. }
  7.  
  8. AddLineItem::~AddLineItem()
  9. {
  10. delete ui;
  11. }
To copy to clipboard, switch view to plain text mode