Hello,
I'm using two Tabs in a Mainwindow. I do load a Workspace from the Mainwindow, and want some Comboboxes in Tab2 get filled in with the Data i load from a file.. (all done in mainw...)

The Problem: m_ui.ComboBox from Tab1 and Tab2 are private. What is the best approach here?

Making an Object CTab2 *Tab2 = new CTab2; inside int main(){...} and make the m_ui from Tab1+2 public? (through this is very ugly..) Or can i use a signal? but the signals i've tried are also not visible from outside mainw, Tab1 or Tab2
(i use signals from the designer and they do not correspond to other m_ui's ??)

Thanks in advance,
Astronomy


Qt Code:
  1. class Tab1; // other Mainwindow - widgets from the Qt Designer...
  2. class Tab2;
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6. QApplication a(argc, argv);
  7.  
  8. CMainWindow *mainw = new CMainWindow;
  9. #if (QT_VERSION < 0x040000)
  10. a.setMainWidget(&mainw);
  11. #endif
  12.  
  13. QTabWidget *Tab = new QTabWidget(mainw);
  14. Tab->addTab(new Tab1, "Tab1");
  15. Tab->addTab(new Tab2, "Tab2");
  16. mainw->setCentralWidget(Tab);
  17. mainw->show();
  18.  
  19. return a.exec();
  20. }
To copy to clipboard, switch view to plain text mode