hi i have a mainwindow.ui that has one QLineEdit named nodes and also a pushButton...and i have a secwindow.ui with two QLineEdit named nodes1, nodes2

what i want to do is when a entering a certain number in nodes, let's say "1" so i would want to make nodes1 empty and nodes2 has a text as "Null".

my problem is where to put my if statment that include all three line edits?

mainwindow.h
Qt Code:
  1. ....
  2. public:
  3. SecWindow *secwindow;
  4.  
  5. signals:
  6. void nodes(const QString &text); //my signal for nodes
To copy to clipboard, switch view to plain text mode 

mainwindow.cpp
Qt Code:
  1. void MainWindow::on_pushButton_clicked()
  2. {
  3. secwindow = new SecWindow(this);
  4. connect(nodes,&QLineEdit::textChanged,secwindow,&SecWindow::nodes1); //a connect between nodes
  5. QString number_of_nodes = ui->nodes->text(); //and nodes1
  6.  
  7. if(number_of_nodes == "1"){ // i cant put a condition
  8. } // between nodes and nodes1
  9.  
  10. secwindow->show();
To copy to clipboard, switch view to plain text mode 

secwindow.h
Qt Code:
  1. ......
  2. public slots:
  3. void nodes1(const QString &text);
  4. void nodes2(const QString &text);
  5. private slots:
  6. void on_pushButton_clicked();
  7.  
  8. void on_nodes1_textChanged(const QString &arg1);
To copy to clipboard, switch view to plain text mode 

secwindow.cpp
Qt Code:
  1. void SecWindow::nodes1(const QString &text) // still confused how or where to put the if statment
  2. {
  3. }
To copy to clipboard, switch view to plain text mode 


so am not very clear where to add my if stament in mainwindow.cpp
or secwindow.cpp

please help me