My UI is defined like this

mainwindow.h
Qt Code:
  1. #include <QMainWindow>
  2. #include "ui_mainwindow.h"
  3. #include "main_print_functions.h"
  4. class MainWindow : public QMainWindow, public Ui::MainWindow {
  5. Q_OBJECT
  6.  
  7. public:
  8. MainWindow();
  9. .
  10. .
  11. .
  12. };
To copy to clipboard, switch view to plain text mode 

So how can I access the components in main_print_functions class?
This doesn't work:
Qt Code:
  1. MainWindow gui;
  2. gui.checkBox->isChecked()
To copy to clipboard, switch view to plain text mode 

Can you post a piece of code that shows me how to do this?