my code or that Gtk code ..?

my Qt code:
Qt Code:
  1. timer2 = new QTimer(this);
  2. timer2->setSingleShot(TRUE);
  3.  
  4. timer_FS = new QTimer(this);
  5. timer_FS->start(300);
  6.  
  7. container2 = new QX11EmbedContainer(this);
  8. container2->setPalette(QPalette(Qt::red));
  9. container2->setAutoFillBackground(true);
  10.  
  11.  
  12. procc2 = new QProcess();
  13. procc2->setProcessChannelMode(QProcess::MergedChannels);
  14. connect(procc2, SIGNAL(readyReadStandardOutput()), this, SLOT(readFromStdout2()));
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. QHBoxLayout *layoout4 = new QHBoxLayout();
  2. layoout4->addWidget(container2);
  3.  
  4. mainFrame5->setLayout(layoout4);
  5.  
  6. connect(timer2, SIGNAL(timeout()), this, SLOT(embed2()));
  7. connect(FPSBackButton, SIGNAL(clicked()), this, SLOT(timeout_bg2()));
  8. connect(timer_FS, SIGNAL(timeout()), this, SLOT(timeout_FS()));
To copy to clipboard, switch view to plain text mode 

/*setFPScanner =1 will be set when a embed Button is clicked in my Qt app*/
Qt Code:
  1. void
  2. MainWindow::timeout_FS(){
  3.  
  4. if(setFPScanner == 1)
  5. mainstackedWidget->setCurrentIndex(4);
  6. else if(embedFPScanner == 1)
  7. {
  8. QString program4 = "./gtk_demo2";
  9. //QString program4 = "./animate";
  10. QStringList arguments2;
  11. if(procc2->state() != QProcess::Running)
  12. {
  13. procc2->start(program4, arguments2);
  14. }
  15. }
  16.  
  17. }
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. void MainWindow::readFromStdout2()
  2. {
  3. int j = 4;
  4. bool ok;
  5. QString out;
  6. out = procc2->readAllStandardOutput();
  7. j = out.toInt(&ok, 16);
  8. printf("j =%d\n",j);
  9. if(j == 1)
  10. printf("device not connected\n");
  11. else{
  12. printf("the device connected\n");
  13. timer2->start(2000);
  14. }
  15.  
  16. }
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. void MainWindow::embed2()
  2. {
  3.  
  4. container2->embedClient(widedit->text().toInt(&ok, 16));
  5. }
To copy to clipboard, switch view to plain text mode 

/*this will be set setFpscanner when a back button in my Qt app is clicked*/
Qt Code:
  1. void MainWindow::timeout_bg2()
  2. {
  3. timer_FS->stop();
  4. setFPScanner = 0;
  5. mainstackedWidget->setCurrentIndex(1);
  6. timer_FS->start();
  7. }
To copy to clipboard, switch view to plain text mode 

this is my whole code in that part i written .... if u find any error please help me ...