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
	
	- .... 
- public: 
-     SecWindow *secwindow; 
-   
- signals: 
-     void-  nodes (const QString &- text )- ;   //my signal for nodes
 
        ....
public:
    SecWindow *secwindow;
signals:
    void nodes(const QString &text);  //my signal for nodes
To copy to clipboard, switch view to plain text mode 
  
mainwindow.cpp
	
	- void MainWindow::on_pushButton_clicked() 
- { 
-   secwindow = new SecWindow(this); 
-   connect(nodes,&QLineEdit::textChanged,secwindow,&SecWindow::nodes1); //a connect between nodes   
-   QString-  number_of_nodes  =-  ui -- >nodes -- >text ()- ;                                      //and nodes1
 
-   
-   if(number_of_nodes == "1"){                                                             // i cant put a condition  
- }                                                                                                     // between  nodes and nodes1 
-   
-   secwindow->show(); 
        void MainWindow::on_pushButton_clicked()
{
  secwindow = new SecWindow(this);
  connect(nodes,&QLineEdit::textChanged,secwindow,&SecWindow::nodes1); //a connect between nodes  
  QString number_of_nodes = ui->nodes->text();                                     //and nodes1
   
  if(number_of_nodes == "1"){                                                             // i cant put a condition 
}                                                                                                     // between  nodes and nodes1
  
  secwindow->show();
To copy to clipboard, switch view to plain text mode 
  
secwindow.h
	
	- ...... 
- public slots: 
- private slots: 
-     void on_pushButton_clicked(); 
-   
-     void-  on_nodes1_textChanged (const QString &- arg1 )- ; 
 
        ......
public slots:
   void nodes1(const QString &text);
   void nodes2(const QString &text);
private slots:
    void on_pushButton_clicked();
    void on_nodes1_textChanged(const QString &arg1);
To copy to clipboard, switch view to plain text mode 
  
secwindow.cpp
	
	- void-  SecWindow ::nodes1(const QString &- text )     // still confused how or where to put the if statment
 
- { 
- } 
        void SecWindow::nodes1(const QString &text)     // still confused how or where to put the if statment
{
}
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
				
			
Bookmarks