Good day,

Created 2 classes (mainWindow & qlabel)
I have a variable of type bool in mainWindow class
How do I check its status from mainWindow's subclass(qlabel)

Qt Code:
  1. main.cpp
  2. void MainWindow::on_action_yes_triggered()
  3. {
  4. flag3 = true;
  5. }
To copy to clipboard, switch view to plain text mode 

in qlabel class
Qt Code:
  1. if(MainWindow.flag3 == true)
  2. {
  3. //do function
  4. }
To copy to clipboard, switch view to plain text mode 

Errors: expected primary expression before '.'
where am i going wrong