PDA

View Full Version : bool check status from subclass



ebsaith
18th June 2013, 11:06
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)



main.cpp
void MainWindow::on_action_yes_triggered()
{
flag3 = true;
}


in qlabel class


if(MainWindow.flag3 == true)
{
//do function
}


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

Santosh Reddy
18th June 2013, 12:54
If qlabel is subclass of MainWindow :confused:

if(flag3 == true)