Results 1 to 2 of 2

Thread: QProcess1

  1. #1
    Join Date
    Feb 2009
    Posts
    189
    Thanks
    2

    Default QProcess1

    Dear Friends I want to run a program(executable) from within my code for that I am doing like this…

    Bool TableWidget::saveFileTYK()
    {
    QString program(“./home/sdh/WindlyzerDev/interpolate_tyk”);

    QProcess *tykprocess = new QProcess(this);

    Tykprocess->start(propgram);

    connect (tykprocess,SIGNAL(started()),this,SLOT(myslot())) ;
    }
    void TableWidget::myslot()
    {
    qDebug() << “program started” << “\n”;
    }

    But here I am not getting the signal started() that means my program is not running can u tell me anyone what could be the problem plss ??

  2. #2
    Join Date
    Dec 2006
    Posts
    426
    Thanks
    8
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QProcess1

    Too late to connect, change the calling order:

    connect (tykprocess,SIGNAL(started()),this,SLOT(myslot())) ;
    Tykprocess->start(propgram);

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.